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

Java types are mapped to Avro schemas as follows:

The {@link org.apache.avro.reflect.Union Union} annotation can be used to support reflection of schemas for interfaces, abstract base classes and other uses of polymorphism.

The {@link org.apache.avro.reflect.Stringable Stringable} annotation will cause a type to be serialized via its {@link java.lang.Object#toString() toString} method.

Fields annotated with {@link org.apache.avro.reflect.AvroIgnore AvroIgnore} will not be written or read to.

The {@link org.apache.avro.reflect.AvroName AvroName} annotation renames the field in the schema to the given name. The reflect datum reader will look for a schema field with the given name, when trying to read into such an annotated java field.

The {@link org.apache.avro.reflect.AvroMeta AvroMeta} annotation adds an arbitrary key:value pair in the schema at the node of the java field.

The {@link org.apache.avro.reflect.AvroSchema AvroSchema} annotation forces the use of an custom schema.

The {@link org.apache.avro.reflect.AvroEncode AvroEncode} annotation forces the use of an custom encoder. This annotation overrides {@link org.apache.avro.reflect.Stringable Stringable} and {@link org.apache.avro.reflect.Nullable Nullable}.