Package org.apache.avro.reflect

Use Java reflection to generate schemas and protocols for existing classes.

See:
          Description

Class Summary
InduceSchemaTool Utility to induce a schema from a class or a protocol from an interface.
ReflectData Utilities to use existing Java classes and interfaces via reflection.
ReflectData.AllowNull ReflectData implementation that permits null field values.
ReflectDatumReader<T> DatumReader for existing classes via Java reflection.
ReflectDatumWriter<T> DatumWriter for existing classes via Java reflection.
ReflectRequestor A Requestor for existing interfaces.
ReflectResponder Responder for existing interfaces.
 

Annotation Types Summary
Nullable Declares that null is a valid value for a Java type.
Stringable Declares that a class should be represented by an Avro string.
Union Declares that a Java type should be represented by an Avro union schema.
 

Package org.apache.avro.reflect Description

Use Java reflection to generate schemas and protocols for existing classes.

This API is not recommended except as a stepping stone for systems that currently uses Java interfaces to define RPC protocols. For new RPC systems, the specific API is preferred. For systems that process dynamic data, the generic API is probably best.

Java types are mapped to Avro schemas as follows:

The Union annotation can be used to support reflection of schemas for interfaces, abstract base classes and other uses of polymorphism.



Copyright © 2010 The Apache Software Foundation