Package lombok.experimental
Annotation Type FieldNameConstants
@Target(TYPE)
@Retention(SOURCE)
public @interface FieldNameConstants
Generates an inner type, containing String constants containing the field name for each field. Alternatively, generates an inner enum with enum values matching each field name.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanasEnumjava.lang.StringinnerTypeNameAccessLevellevelbooleanonlyExplicitlyIncludedOnly include fields and methods explicitly marked with@FieldNameConstants.Include.
-
Element Details
-
level
AccessLevel level- Default:
- PUBLIC
-
asEnum
boolean asEnum- Default:
- false
-
innerTypeName
java.lang.String innerTypeName- Default:
- ""
-
onlyExplicitlyIncluded
boolean onlyExplicitlyIncludedOnly include fields and methods explicitly marked with@FieldNameConstants.Include. Normally, all (non-static) fields are included by default.- Returns:
- If
true, don't include non-static fields automatically (default:false).
- Default:
- false
-