public class Getter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GET_PREFIX |
static java.lang.String |
IS_PREFIX |
static java.lang.String |
SHOULD_PREFIX |
| Constructor and Description |
|---|
Getter() |
| Modifier and Type | Method and Description |
|---|---|
static Method |
find(TypeDef clazz,
Property property)
Find the getter of the specified property in the type.
|
static Method |
find(TypeDef clazz,
Property property,
boolean acceptPrefixless)
Find the getter of the specified property in the type.
|
static Method |
forProperty(Property property) |
static boolean |
is(Method method)
Checks if the specified method is a getter.
|
static boolean |
is(Method method,
boolean acceptPrefixless)
Checks if the specified method is a getter.
|
static java.lang.String |
name(Property property)
Return the getter name for the specified
Property. |
static java.lang.String |
prefix(Property property) |
static java.lang.String |
propertyName(Method method)
Return the property name for the specified getter
method. |
static java.lang.String |
propertyNameSafe(Method method)
Return the property name for the specified getter
method. |
public static final java.lang.String GET_PREFIX
public static final java.lang.String IS_PREFIX
public static final java.lang.String SHOULD_PREFIX
public static Method find(TypeDef clazz, Property property)
clazz - The class.property - The property.public static Method find(TypeDef clazz, Property property, boolean acceptPrefixless)
clazz - The class.property - The property.acceptPrefixless - Flag to accept prefixless getters.public static boolean is(Method method)
method - The specified method.public static boolean is(Method method, boolean acceptPrefixless)
method - The method.acceptPrefixless - Flag to enable support of prefixless getters.public static java.lang.String name(Property property)
Property.property - The property.public static java.lang.String propertyName(Method method)
method.method - The method.public static java.lang.String propertyNameSafe(Method method)
method.
This method will not check if the method is an actual getter and will return the method name if not.method - The method.public static java.lang.String prefix(Property property)
Copyright © 2019. All Rights Reserved.