|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avro.generic.GenericDatumReader<Object> org.apache.avro.reflect.ReflectDatumReader
public class ReflectDatumReader
DatumReader
for existing classes via
Java reflection.
Field Summary | |
---|---|
protected String |
packageName
|
Constructor Summary | |
---|---|
ReflectDatumReader(Schema root,
String packageName)
|
|
ReflectDatumReader(String packageName)
|
Method Summary | |
---|---|
protected void |
addField(Object record,
String name,
int position,
Object o)
Called by the default implementation of GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder) to add a
record fields value to a record instance. |
protected Object |
createEnum(String symbol,
Schema schema)
Called to create an enum value. |
protected Object |
createFixed(Object old,
Schema schema)
Called to create an fixed value. |
protected Object |
getField(Object record,
String name,
int position)
Called by the default implementation of GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder) to retrieve a
record field value from a reused instance. |
protected static Object |
newInstance(Class c)
Create a new instance of the named class. |
protected Object |
newRecord(Object old,
Schema schema)
Called to create new record instances. |
protected void |
removeField(Object record,
String name,
int position)
Called by the default implementation of GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder) to remove a
record field value from a reused instance. |
Methods inherited from class org.apache.avro.generic.GenericDatumReader |
---|
addToArray, addToMap, createBytes, createFixed, createString, defaultFieldValue, newArray, newMap, peekArray, read, read, readArray, readBytes, readEnum, readFixed, readMap, readRecord, readString, setSchema, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String packageName
Constructor Detail |
---|
public ReflectDatumReader(String packageName)
public ReflectDatumReader(Schema root, String packageName)
Method Detail |
---|
protected Object newRecord(Object old, Schema schema)
GenericDatumReader
GenericData.Record
.
newRecord
in class GenericDatumReader<Object>
protected void addField(Object record, String name, int position, Object o)
GenericDatumReader
GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder)
to add a
record fields value to a record instance. The default implementation is
for GenericRecord
.
addField
in class GenericDatumReader<Object>
protected Object getField(Object record, String name, int position)
GenericDatumReader
GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder)
to retrieve a
record field value from a reused instance. The default implementation is
for GenericRecord
.
getField
in class GenericDatumReader<Object>
protected void removeField(Object record, String name, int position)
GenericDatumReader
GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder)
to remove a
record field value from a reused instance. The default implementation is
for GenericRecord
.
removeField
in class GenericDatumReader<Object>
protected Object createEnum(String symbol, Schema schema)
GenericDatumReader
createEnum
in class GenericDatumReader<Object>
protected Object createFixed(Object old, Schema schema)
GenericDatumReader
GenericFixed
.
createFixed
in class GenericDatumReader<Object>
protected static Object newInstance(Class c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |