Annotation Type FieldDefaults


  • @Target(TYPE)
    @Retention(SOURCE)
    public @interface FieldDefaults
    Adds modifiers to each field in the type with this annotation.

    Complete documentation is found at the project lombok features page for @FieldDefaults.

    If makeFinal is true, then each (instance) field that is not annotated with @NonFinal will have the final modifier added.

    If level is set, then each (instance) field that is package private (i.e. no access modifier) and does not have the @PackagePrivate annotation will have the appropriate access level modifier added.

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      AccessLevel level  
      boolean makeFinal  
    • Element Detail

      • level

        AccessLevel level
        Default:
        lombok.AccessLevel.NONE
      • makeFinal

        boolean makeFinal
        Default:
        false