Annotation Type Encoding


@Target(TYPE) @Retention(SOURCE) public @interface Encoding
Encoding defines set of template methods and fields which describes how attributes of specific types are implemented in generated value class. Encoding annotation is processed by the annotation processor (the same as used for value objects) and generates annotation named *Enabled in the same package, inserting encoding simple class name in placeholder. Encoding class consists of special fields methods, builder inner static class with it's own fields and methods.

When programming the encoding class, remember that code analyser is not akin full-fledged java compiler, but a set of simplified routines which cannot possibly

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Template method which describes how attribute should be built so it would can be assigned to.
    static @interface 
    Attribute's builder template.
    static @interface 
    With copy method template.
    static @interface 
    Expose describes how type matches to the encoding via return type.
    static @interface 
    Implementation field must be annotated, it also must be private.
    static @interface 
    Builder init method template.
    static @interface 
    Template method for internal purposes that describes how to ask builder if an attribute was initialized.
    static @interface 
    Many elements (but not all) supports customized naming patterns.
    static @interface 
     
    static enum 
    Standard namings can be used to reuse standard styles, like the ones defined in Value.Immutable.Style for the custom-defined elements in encoding.