|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avro.generic.GenericData
org.apache.avro.specific.SpecificData
public class SpecificData
Utilities for generated Java classes and interfaces.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.avro.generic.GenericData |
|---|
GenericData.Array<T>, GenericData.Fixed, GenericData.Record |
| Constructor Summary | |
|---|---|
protected |
SpecificData()
|
| Method Summary | |
|---|---|
int |
compare(Object o1,
Object o2,
Schema s)
Compare objects according to their schema. |
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. |
String |
getClassName(Schema schema)
Returns the Java class name indicated by a schema's name and namespace. |
Protocol |
getProtocol(Class iface)
Return the protocol for a Java interface. |
protected Schema |
getRecordSchema(Object record)
Called to obtain the schema of a record. |
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). |
protected boolean |
isRecord(Object datum)
Called by the default implementation of GenericData.instanceOf(org.apache.avro.Schema, java.lang.Object). |
boolean |
validate(Schema schema,
Object datum)
Returns true if a Java datum matches a schema. |
| Methods inherited from class org.apache.avro.generic.GenericData |
|---|
hashCode, hashCodeAdd, induce, instanceOf, isArray, isBytes, isFixed, isMap, isString, resolveUnion, toString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SpecificData()
| Method Detail |
|---|
public static SpecificData get()
protected boolean isRecord(Object datum)
GenericDataGenericData.instanceOf(org.apache.avro.Schema, java.lang.Object).
isRecord in class GenericDataprotected Schema getRecordSchema(Object record)
GenericData
getRecordSchema in class GenericDataprotected boolean isEnum(Object datum)
GenericDataGenericData.instanceOf(org.apache.avro.Schema, java.lang.Object).
isEnum in class GenericData
public boolean validate(Schema schema,
Object datum)
GenericData
validate in class GenericDatapublic Class getClass(Schema schema)
public String getClassName(Schema schema)
public Schema getSchema(Type type)
protected Schema createSchema(Type type,
Map<String,Schema> names)
public Protocol getProtocol(Class iface)
public int compare(Object o1,
Object o2,
Schema s)
GenericDataBinaryData.compare(byte[], int, byte[], int, Schema).
compare in class GenericData
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||