Module tcconfig.core
Annotation Type AutoSerialization
-
@Documented @Retention(RUNTIME) @Target(TYPE) public @interface AutoSerialization
Annotates a class that is auto-serializable.The annotated class will use
SerializeAsto serialize the fields, not theserialize(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
SerializeAsin the class type.E.g:
Locationcontaining three fields x, y, z. Each field is annotated withSerializeAsand 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