# Package org.apache.avro.specific

package org.apache.avro.specific
Generate specific Java classes for schemas and protocols.

This API is recommended for most RPC uses and for data applications that always use the same datatypes, i.e., whose schemas are known at compile time. For data applications that accept dynamic datatypes the `generic` API is recommended.

Avro types are mapped to Java as follows:

- Record, enum, and fixed schemas generate Java class definitions.
- If a Conversion instance is available for the related logical type, the value will be mapped to the object returned by that Conversion. The logical type conversions for `date`, `time-millis`, `timestamp-millis` and `decimal` are pre-defined in the class invalid input: '{@link <a href="../../../../org/apache/avro/compiler/specific/SpecificCompiler.html" title="class in org.apache.avro.compiler.specific"><code>SpecificCompiler</code></a>'}.
- All other types are mapped as in the `generic` API.

Note that when a generated class is not found corresponding to a record, enum or fixed schema, a `generic` representation is used. This permits generated classes to be nested within generic data structures.

Related Packages
Package
Description
org.apache.avro
Avro kernel classes.
Class
Description
AvroGenerated
Indicates that an annotated class is an Avro generated class.
FixedSize
Declares the size of implementations of `GenericFixed`.
SpecificData
Utilities for generated Java classes and interfaces.
SpecificData.SchemaConstructable
Tag interface that indicates that a class has a one-argument constructor that accepts a Schema.
SpecificDatumReader<T>
`DatumReader` for generated Java classes.
SpecificDatumWriter<T>
`DatumWriter` for generated Java classes.
SpecificErrorBuilderBase<T extends SpecificExceptionBase>
Abstract base class for specific ErrorBuilder implementations.
SpecificExceptionBase
Base class for specific exceptions.
SpecificFixed
Base class for generated fixed-sized data classes.
SpecificRecord
Implemented by generated record classes.
SpecificRecordBase
Base class for generated record classes.
SpecificRecordBuilderBase<T extends SpecificRecord>
Abstract base class for specific RecordBuilder implementations.