Annotation Type Value.Modifiable


  • @Documented
    @Target(TYPE)
    public static @interface Value.Modifiable
    Generate modifiable implementation of abstract value class. Modifiable implementation class might be useful when you either need over-flexible builder or, alternatively, partially built representation of value type. This annotation could be used as companion to Value.Immutable to provide modifiable variant that is convertible back and forth to immutable form. When it is used in a standalone manner, i.e. without using

    Generated class will have name with "Modifiable" prefix by default which can be customizable using "typeModifiable" style. Use create() factory method to create instances or using "new" operator which is also depends on "create" style . Generated modifiable class will have setter methods that return this for chained invocation. Getters will be of the same shape as defined by abstract value types.

    Note: unlike @Value.Immutable, this annotation has very little of additional "magic" and customisations implemented. Annotation like Value.Include, Value.Enclosing, Value.Lazy do not work with modifiable implementation

    This is beta functionality that is likely to change