@Test public void testDefaultValue() { assertEquals(false, PPrimitive.BOOL.getDefaultValue()); assertEquals((byte) 0, PPrimitive.BYTE.getDefaultValue()); assertEquals((short) 0, PPrimitive.I16.getDefaultValue()); assertEquals(0, PPrimitive.I32.getDefaultValue()); assertEquals(0L, PPrimitive.I64.getDefaultValue()); assertEquals(0.0d, PPrimitive.DOUBLE.getDefaultValue()); assertEquals("", PPrimitive.STRING.getDefaultValue()); assertEquals(Binary.empty(), PPrimitive.BINARY.getDefaultValue()); }
@Override public Object getDefaultValue() { return defaultValue; }
PPrimitive implements PDescriptor { @Override public Object getDefaultValue() { return defaultValue; } }
PPrimitive implements PDescriptor { @Override public Object getDefaultValue() { return defaultValue; } private  PPrimitive(PType type, Object defValue, boolean nativePrimitive); }
PPrimitive implements PDescriptor { @Override public Object getDefaultValue() { return defaultValue; } private  PPrimitive(PType type, Object defValue, boolean nativePrimitive); @Nonnull PPrimitiveProvider provider(); @Override String getProgramName(); @Nonnull @Override String getName(); @Nonnull @Override String getQualifiedName(String programContext); @Override String toString(); @Nonnull @Override PType getType(); @Override boolean equals(Object o); @Override int hashCode(); @Override Object getDefaultValue(); boolean isNativePrimitive(); static PPrimitive findByName(String name); }
PPrimitive implements PDescriptor { @Override public Object getDefaultValue() { return defaultValue; } private  PPrimitive(PType type, Object defValue, boolean nativePrimitive); @Nonnull PPrimitiveProvider provider(); @Override String getProgramName(); @Nonnull @Override String getName(); @Nonnull @Override String getQualifiedName(String programContext); @Override String toString(); @Nonnull @Override PType getType(); @Override boolean equals(Object o); @Override int hashCode(); @Override Object getDefaultValue(); boolean isNativePrimitive(); static PPrimitive findByName(String name); static final PPrimitive VOID; static final PPrimitive BOOL; static final PPrimitive BYTE; static final PPrimitive I16; static final PPrimitive I32; static final PPrimitive I64; static final PPrimitive DOUBLE; static final PPrimitive STRING; static final PPrimitive BINARY; }