Annotation Type B2Json.union


  • @Retention(RUNTIME)
    @Target(TYPE)
    public static @interface B2Json.union

    Class annotation that says a class is the base class for a union type.

    The class must not extend any other classes, but may implement interfaces. It must have no B2Json field or constructor annotations

    Direct instances of this class cannot be (de)serialized. Instances of subclasses can be.

    For now, the implementation of deserialization is INEFFICIENT, so union types should be used only for small objects.

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String typeField  
    • Element Detail

      • typeField

        java.lang.String typeField