public class SpecificData extends GenericData
| Modifier and Type | Class and Description | 
|---|---|
static interface  | 
SpecificData.SchemaConstructable
Tag interface that indicates that a class has a one-argument constructor
 that accepts a Schema. 
 | 
GenericData.Array<T>, GenericData.EnumSymbol, GenericData.Fixed, GenericData.Record, GenericData.StringTypeSTRING_PROP, STRING_TYPE_STRING| Modifier | Constructor and Description | 
|---|---|
protected  | 
SpecificData()
For subclasses. 
 | 
  | 
SpecificData(ClassLoader classLoader)
Construct with a specific classloader. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected int | 
compare(Object o1,
       Object o2,
       Schema s,
       boolean eq)
Comparison implementation. 
 | 
DatumReader | 
createDatumReader(Schema schema)
Returns a  
DatumReader for this kind of data. | 
Object | 
createFixed(Object old,
           Schema schema)
Called to create an fixed value. 
 | 
protected Schema | 
createSchema(Type type,
            Map<String,Schema> names)
Create the schema for a Java type. 
 | 
static SpecificData | 
get()
Return the singleton instance. 
 | 
Class | 
getClass(Schema schema)
Return the class that implements a schema, or null if none exists. 
 | 
ClassLoader | 
getClassLoader()
Return the class loader that's used. 
 | 
static String | 
getClassName(Schema schema)
Returns the Java class name indicated by a schema's name and namespace. 
 | 
protected Schema | 
getEnumSchema(Object datum)
Called to obtain the schema of a enum. 
 | 
Protocol | 
getProtocol(Class iface)
Return the protocol for a Java interface. 
 | 
Schema | 
getSchema(Type type)
Find the schema for a Java type. 
 | 
protected boolean | 
isEnum(Object datum)
Called by the default implementation of  
GenericData.instanceOf(org.apache.avro.Schema, java.lang.Object). | 
static Object | 
newInstance(Class c,
           Schema s)
Create an instance of a class. 
 | 
Object | 
newRecord(Object old,
         Schema schema)
Called to create new record instances. 
 | 
compare, createFixed, deepCopy, getField, getField, getFixedSchema, getRecordSchema, getRecordState, getSchemaName, hashCode, hashCodeAdd, induce, instanceOf, isArray, isBytes, isFixed, isMap, isRecord, isString, resolveUnion, setField, setField, setStringType, toString, toString, validateprotected SpecificData()
get().public SpecificData(ClassLoader classLoader)
public ClassLoader getClassLoader()
public DatumReader createDatumReader(Schema schema)
GenericDataDatumReader for this kind of data.createDatumReader in class GenericDatapublic static SpecificData get()
protected boolean isEnum(Object datum)
GenericDataGenericData.instanceOf(org.apache.avro.Schema, java.lang.Object).isEnum in class GenericDataprotected Schema getEnumSchema(Object datum)
GenericDatagetEnumSchema in class GenericDatapublic Class getClass(Schema schema)
public static String getClassName(Schema schema)
protected Schema createSchema(Type type, Map<String,Schema> names)
protected int compare(Object o1, Object o2, Schema s, boolean eq)
GenericDatacompare in class GenericDatapublic static Object newInstance(Class c, Schema s)
SpecificData.SchemaConstructable, call a constructor with a Schema parameter, otherwise use a no-arg constructor.public Object createFixed(Object old, Schema schema)
GenericDataGenericFixed.createFixed in class GenericDatapublic Object newRecord(Object old, Schema schema)
GenericDataGenericData.Record.newRecord in class GenericDataCopyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.