public class Getter extends Object
Modifier and Type | Field and Description |
---|---|
static String |
GET_PREFIX |
static String |
IS_PREFIX |
static 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 String |
name(Property property)
Return the getter name for the specified
Property . |
static String |
prefix(Property property) |
static String |
propertyName(Method method)
Return the property name for the specified getter
method . |
static String |
propertyNameSafe(Method method)
Return the property name for the specified getter
method . |
public static final String GET_PREFIX
public static final String IS_PREFIX
public static final 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 String name(Property property)
Property
.property
- The property.public static String propertyName(Method method)
method
.method
- The method.public static 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.Copyright © 2019 JBoss by Red Hat. All rights reserved.