|
Lombok - v0.11.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlombok.core.TransformationsUtil
public class TransformationsUtil
Container for static utility methods useful for some of the standard lombok transformations, regardless of target platform (e.g. useful for both javac and Eclipse lombok implementations).
| Field Summary | |
|---|---|
static Pattern |
NON_NULL_PATTERN
Matches the simple part of any annotation that lombok considers as indicative of NonNull status. |
static Pattern |
NULLABLE_PATTERN
Matches the simple part of any annotation that lombok considers as indicative of Nullable status. |
| Method Summary | |
|---|---|
static List<String> |
toAllGetterNames(AnnotationValues<Accessors> accessors,
CharSequence fieldName,
boolean isBoolean)
Returns all names of methods that would represent the getter for a field with the provided name. |
static List<String> |
toAllSetterNames(AnnotationValues<Accessors> accessors,
CharSequence fieldName,
boolean isBoolean)
Returns all names of methods that would represent the setter for a field with the provided name. |
static String |
toGetterName(AnnotationValues<Accessors> accessors,
CharSequence fieldName,
boolean isBoolean)
Generates a getter name from a given field name. |
static String |
toSetterName(AnnotationValues<Accessors> accessors,
CharSequence fieldName,
boolean isBoolean)
Generates a setter name from a given field name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Pattern NON_NULL_PATTERN
public static final Pattern NULLABLE_PATTERN
| Method Detail |
|---|
public static String toGetterName(AnnotationValues<Accessors> accessors,
CharSequence fieldName,
boolean isBoolean)
Accessors). If the field name does not fit
the prefix list, this method immediately returns null.Accessors has fluent=true, then return the basename.isBoolean is true.isBoolean is true: Check if the field starts with is followed by a non-lowercase character. If so, return the field name verbatim.
accessors - Accessors configuration.fieldName - the name of the field.isBoolean - if the field is of type 'boolean'. For fields of type java.lang.Boolean, you should provide false.
null if this field does not fit expected patterns and therefore cannot be turned into a getter name.
public static String toSetterName(AnnotationValues<Accessors> accessors,
CharSequence fieldName,
boolean isBoolean)
Accessors). If the field name does not fit
the prefix list, this method immediately returns null.Accessors has fluent=true, then return the basename.isBoolean is true: Check if the field starts with is followed by a non-lowercase character.
If so, replace is with set and return that."set" plus the possibly title/uppercased first character, and the rest of the field name.
accessors - Accessors configuration.fieldName - the name of the field.isBoolean - if the field is of type 'boolean'. For fields of type java.lang.Boolean, you should provide false.
null if this field does not fit expected patterns and therefore cannot be turned into a getter name.
public static List<String> toAllGetterNames(AnnotationValues<Accessors> accessors,
CharSequence fieldName,
boolean isBoolean)
isBoolean is true, then a field named isRunning would produce:[isRunning, getRunning, isIsRunning, getIsRunning]
accessors - Accessors configuration.fieldName - the name of the field.isBoolean - if the field is of type 'boolean'. For fields of type 'java.lang.Boolean', you should provide false.
public static List<String> toAllSetterNames(AnnotationValues<Accessors> accessors,
CharSequence fieldName,
boolean isBoolean)
isBoolean is true, then a field named isRunning would produce:[setRunning, setIsRunning]
fieldName - the name of the field.isBoolean - if the field is of type 'boolean'. For fields of type 'java.lang.Boolean', you should provide false.
|
Lombok - v0.11.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||