| Modifier and Type | Class and Description |
|---|---|
| public static interface | SpecificData.SchemaConstructable
Tag interface that indicates that a class has a one-argument constructor that accepts a Schema. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| private final ConcurrentMap | |
| private static final Function | |
| public static final String | |
| private static final SpecificData | |
| public static final String | |
| private static final Function | |
| private static final Class | |
| private static final Class | |
| private static final Schema | |
| public static final char | |
| public static final Set | RESERVED_WORDS
Reserved words from https://docs.oracle.com/javase/specs/jls/se16/html/jls-3.html require mangling in order to be used in generated Java code. |
| private static final Class | |
| private final ClassValueCache | |
| private final Map | |
| protected Set | stringableClasses
Read/write some common builtin classes as strings. |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected int | compare(Object o1, Object o2, Schema s, boolean eq)
Overrides org. |
| public DatumReader | createDatumReader(Schema schema)
Overrides org. DatumReader for this kind of data.
|
| public DatumReader | createDatumReader(Schema writer, Schema reader)
Overrides org. DatumReader for this kind of data.
|
| public DatumWriter | createDatumWriter(Schema schema)
Overrides org. DatumWriter for this kind of data.
|
| public Object | createEnum(String symbol, Schema schema)
Called to create an enum value.
|
| public Object | createFixed(Object old, Schema schema)
Called to create an fixed value.
|
| protected Schema | |
| public Object | createString(Object value)
Called to create an string value.
|
| public static SpecificData | |
| public Class | |
| public static String | |
| public static BinaryDecoder | |
| public static BinaryEncoder | |
| protected Schema | getEnumSchema(Object datum)
Overrides org. |
| public static < . T> SpecificData | Returns: The SpecificData from the SpecificRecordBase instance, or the default SpecificData instance.A class c)If the given class is assignable to |
| public static SpecificData | Returns: the SpecificData associated with the schema's class, or the default instance.the reader schema reader)For RECORD and UNION type schemas, this method returns the SpecificData instance of the class associated with the schema, in order to get the right conversions for any logical types used. |
| public GenericData. | getNewRecordSupplier(Schema schema)
Overrides org. |
| public Protocol | |
| public Schema | |
| protected String | getSchemaName(Object datum)
Overrides org. |
| private Class | |
| protected boolean | isEnum(Object datum)
Overrides org. instanceOf.
|
| protected boolean | |
| protected boolean | |
| public static Object | |
| public Object | |
| public void | |
| protected static String | |
| public boolean |
| CLASS_PROP | back to summary |
|---|---|
| public static final String CLASS_PROP | |
| classCache | back to summary |
|---|---|
| private final ConcurrentMap<String, Class<T>> classCache | |
| CTOR_CACHE | back to summary |
|---|---|
| private static final Function<Class<?>, Constructor<?>> CTOR_CACHE | |
| ELEMENT_PROP | back to summary |
|---|---|
| public static final String ELEMENT_PROP | |
| INSTANCE | back to summary |
|---|---|
| private static final SpecificData INSTANCE | |
| KEY_CLASS_PROP | back to summary |
|---|---|
| public static final String KEY_CLASS_PROP | |
| MODEL_CACHE | back to summary |
|---|---|
| private static final Function<Class<?>, SpecificData> MODEL_CACHE | |
| NO_ARG | back to summary |
|---|---|
| private static final Class<?>[] NO_ARG | |
| NO_CLASS | back to summary |
|---|---|
| private static final Class<T> NO_CLASS | |
| NULL_SCHEMA | back to summary |
|---|---|
| private static final Schema NULL_SCHEMA | |
| RESERVED_WORD_ESCAPE_CHAR | back to summary |
|---|---|
| public static final char RESERVED_WORD_ESCAPE_CHAR | |
| RESERVED_WORDS | back to summary |
|---|---|
| public static final Set<String> RESERVED_WORDS Reserved words from https://docs.oracle.com/javase/specs/jls/se16/html/jls-3.html require mangling in order to be used in generated Java code. | |
| SCHEMA_ARG | back to summary |
|---|---|
| private static final Class<?>[] SCHEMA_ARG | |
| schemaClassCache | back to summary |
|---|---|
| private final ClassValueCache<Schema> schemaClassCache | |
| schemaTypeCache | back to summary |
|---|---|
| private final Map<Type, Schema> schemaTypeCache | |
| stringableClasses | back to summary |
|---|---|
| protected Set<Class<T>> stringableClasses Read/write some common builtin classes as strings. Representing these as strings isn't always best, as they aren't always ordered ideally, but at least they're stored. Also note that, for compatibility, only classes that wouldn't be otherwise correctly readable or writable should be added here, e.g., those without a no-arg constructor or those whose fields are all transient. | |
| useCustomCoderFlag | back to summary |
|---|---|
| private boolean useCustomCoderFlag | |
| SpecificData | back to summary |
|---|---|
| public SpecificData() For subclasses. Applications normally use | |
| SpecificData | back to summary |
|---|---|
| public SpecificData(ClassLoader classLoader) Construct with a specific classloader. | |
| compare | back to summary |
|---|---|
| protected int compare(Object o1, Object o2, Schema s, boolean eq) Overrides org. Doc from org. Comparison implementation. When equals is true, only checks for equality, not for order.
| |
| createDatumReader | back to summary |
|---|---|
| public DatumReader Overrides org. Doc from org. Returns a
| |
| createDatumReader | back to summary |
|---|---|
| public DatumReader Overrides org. Doc from org. Returns a
| |
| createDatumWriter | back to summary |
|---|---|
| public DatumWriter Overrides org. Doc from org. Returns a
| |
| createEnum | back to summary |
|---|---|
| public Object createEnum(String symbol, Schema schema) Overrides org. Doc from org. Called to create an enum value. May be overridden for alternate enum representations. By default, returns a GenericEnumSymbol.
| |
| createFixed | back to summary |
|---|---|
| public Object createFixed(Object old, Schema schema) Overrides org. Doc from org. Called to create an fixed value. May be overridden for alternate fixed
representations. By default, returns
| |
| createSchema | back to summary |
|---|---|
| protected Schema createSchema(Type type, Map<String, Schema> names) Create the schema for a Java type.
| |
| createString | back to summary |
|---|---|
| public Object createString(Object value) Overrides org. Doc from org. Called to create an string value. May be overridden for alternate string representations.
| |
| get | back to summary |
|---|---|
| public static SpecificData get() Hides org. Return the singleton instance. | |
| getClass | back to summary |
|---|---|
| public Class Return the class that implements a schema, or null if none exists. | |
| getClassName | back to summary |
|---|---|
| public static String getClassName(Schema schema) Returns the Java class name indicated by a schema's name and namespace. | |
| getDecoder | back to summary |
|---|---|
| public static BinaryDecoder getDecoder(ObjectInput in) Runtime utility used by generated classes. | |
| getEncoder | back to summary |
|---|---|
| public static BinaryEncoder getEncoder(ObjectOutput out) Runtime utility used by generated classes. | |
| getEnumSchema | back to summary |
|---|---|
| protected Schema getEnumSchema(Object datum) Overrides org. Doc from org. Called to obtain the schema of a enum. By default calls {GenericContainer#getSchema(). May be overridden for alternate enum representations.
| |
| getForClass | back to summary |
|---|---|
| public static <T> SpecificData getForClass(Class<T> c) If the given class is assignable to
| |
| getForSchema | back to summary |
|---|---|
| public static SpecificData getForSchema(Schema reader) For RECORD and UNION type schemas, this method returns the SpecificData instance of the class associated with the schema, in order to get the right conversions for any logical types used.
| |
| getNewRecordSupplier | back to summary |
|---|---|
| public GenericData. Overrides org. Doc from org. create a supplier that allows to get new record instances for a given schema in an optimized way
| |
| getProtocol | back to summary |
|---|---|
| public Protocol getProtocol(Class<T> iface) Return the protocol for a Java interface. | |
| getSchema | back to summary |
|---|---|
| public Schema getSchema(Type type) Find the schema for a Java type. | |
| getSchemaName | back to summary |
|---|---|
| protected String getSchemaName(Object datum) Overrides org. Doc from org. Return the schema full name for a datum. Called by
| |
| getWrapper | back to summary |
|---|---|
| private Class | |
| isEnum | back to summary |
|---|---|
| protected boolean isEnum(Object datum) Overrides org. Doc from org. Called by the default implementation of
| |
| isStringable | back to summary |
|---|---|
| protected boolean isStringable(Class<?> c) True if a class should be serialized with toString(). | |
| isStringType | back to summary |
|---|---|
| protected boolean isStringType(Class<?> c) True if a class IS a string type | |
| newInstance | back to summary |
|---|---|
| public static Object newInstance(Class<T> c, Schema s) Create an instance of a class. If the class implements
| |
| newRecord | back to summary |
|---|---|
| public Object newRecord(Object old, Schema schema) Overrides org. Doc from org. Called to create new record instances. Subclasses may override to use a
different record implementation. The returned instance must conform to the
schema provided. If the old object contains fields not present in the schema,
they should either be removed from the old object, or it should create a new
instance that conforms to the schema. By default, this returns a
| |
| setCustomCoders | back to summary |
|---|---|
| public void setCustomCoders(boolean flag) Dynamically set the value of the custom-coder feature flag. See
| |
| unmangle | back to summary |
|---|---|
| protected static String unmangle(String word) Undoes mangling for reserved words. | |
| useCustomCoders | back to summary |
|---|---|
| public boolean useCustomCoders() Retrieve the current value of the custom-coders feature flag. Defaults to
| |
newInstance