Annotation Type ImmutableProtocol


@Target(TYPE) @Retention(RUNTIME) @InjectAnnotation(target=BUILDER_TYPE,type=Builder.class) @InjectAnnotation(target=IMMUTABLE_TYPE,type=Type.class,code="(builder=[[builder]])") public @interface ImmutableProtocol
Types annotated with this are considered concrete types of the protocol (e.g. Record, and not simply behavioral types (e.g. JsonSerializable.

For every abstract type annotated with this, an immutable, concrete type will be generated. For example, given Record, then ImmutableRecord will be generated. Every leaf type of the protocol - that is, any type which may end up in Record or nested in one of its properties - should be annotated with this.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Marker annotation to indicate that a class is an immutable protocol type builder
    static @interface 
    Marker annotation to indicate that a class is an immutable protocol type
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the builder class for this abstract protocol type
  • Element Details

    • builder

      Class<?> builder
      Returns the builder class for this abstract protocol type