|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avro.generic.GenericDatumWriter<Object>
org.apache.avro.reflect.ReflectDatumWriter
public class ReflectDatumWriter
DatumWriter for existing classes via Java reflection.
| Constructor Summary | |
|---|---|
ReflectDatumWriter()
|
|
ReflectDatumWriter(Schema root)
|
|
| Method Summary | |
|---|---|
protected Object |
getField(Object record,
String name,
int position)
Called by the default implementation of GenericDatumWriter.writeRecord(org.apache.avro.Schema, java.lang.Object, org.apache.avro.io.Encoder) to retrieve
a record field value. |
protected boolean |
instanceOf(Schema schema,
Object datum)
Called to resolve unions. |
protected boolean |
isEnum(Object datum)
Called by the default implementation of GenericDatumWriter.instanceOf(org.apache.avro.Schema, java.lang.Object). |
protected boolean |
isRecord(Object datum)
Called by the default implementation of GenericDatumWriter.instanceOf(org.apache.avro.Schema, java.lang.Object). |
protected void |
writeEnum(Schema schema,
Object datum,
Encoder out)
Called to write an enum value. |
| Methods inherited from class org.apache.avro.generic.GenericDatumWriter |
|---|
getArrayElements, getArraySize, getMapEntries, getMapSize, isArray, isBytes, isFixed, isMap, isString, setSchema, write, write, writeArray, writeBytes, writeFixed, writeMap, writeRecord, writeString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReflectDatumWriter()
public ReflectDatumWriter(Schema root)
| Method Detail |
|---|
protected Object getField(Object record,
String name,
int position)
GenericDatumWriterGenericDatumWriter.writeRecord(org.apache.avro.Schema, java.lang.Object, org.apache.avro.io.Encoder) to retrieve
a record field value. The default implementation is for GenericRecord.
getField in class GenericDatumWriter<Object>
protected void writeEnum(Schema schema,
Object datum,
Encoder out)
throws IOException
GenericDatumWriter
writeEnum in class GenericDatumWriter<Object>IOExceptionprotected boolean isEnum(Object datum)
GenericDatumWriterGenericDatumWriter.instanceOf(org.apache.avro.Schema, java.lang.Object).
isEnum in class GenericDatumWriter<Object>protected boolean isRecord(Object datum)
GenericDatumWriterGenericDatumWriter.instanceOf(org.apache.avro.Schema, java.lang.Object).
isRecord in class GenericDatumWriter<Object>
protected boolean instanceOf(Schema schema,
Object datum)
GenericDatumWriter
instanceOf in class GenericDatumWriter<Object>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||