org.apache.avro.reflect

## Annotation Type Union

-     @Retention(value=RUNTIME)
       @Target(value={TYPE,FIELD,PARAMETER,METHOD})
       @Documented
      public @interface Union

  Declares that a Java type should be represented by an Avro union schema. May be used for base classes or interfaces whose instantiable subclasses can be listed in the parameters to the @Union annotation. If applied to method parameters this determines the reflected message parameter type. If applied to a method, this determines its return type. A null schema may be specified with `Void`.

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `Class[]` | `value` The instantiable classes that compose this union.

- - ### Element Detail

    - #### value

          public abstract Class[] value

      The instantiable classes that compose this union.

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.