Annotation Type AutoSerialization


  • @Documented
    @Retention(RUNTIME)
    @Target(TYPE)
    public @interface AutoSerialization
    Annotates a class that is auto-serializable.

    The annotated class will use SerializeAs to serialize the fields, not the serialize(T) method.

    Notes: The annotated class type must have an empty constructor or a constructor with parameters in the same order as the fields annotated by SerializeAs in the class type.

    E.g: Location containing three fields x, y, z. Each field is annotated with SerializeAs and the value corresponds to the name of the field. The constructor must have 3 parameters in the order of x, y, z (the same order of fields).

    Since:
    1.0
    See Also:
    SerializeAs