Top Description Methods
org.apache.avro.reflect

public @Interface AvroSchema

extends Annotation
Annotations
@Retention:RUNTIME
@Target:TYPE, PARAMETER, METHOD, FIELD
@Documented
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target

Declares that a Java type should have a specified Avro schema, overriding the normally inferred schema. May be used for classes, parameters, fields and method return types.

This is useful for slight alterations to the schema that would be automatically inferred. For example, a List<Integer>whose elements may be null might use the annotation

@AvroSchema("{\"type\":\"array\",\"items\":[\"null\",\"int\"]}")
since the Nullable annotation could not be used here.

Method Summary

Modifier and TypeMethod and Description
public String
value()

The schema to use for this value.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()

The schema to use for this value.