Method Summary |
|
public Number | asNumber(String code) Return a constant value cast to a Number. |
public Object | asObject(String code) Parse the given String (upper or lower case accepted) and return
the appropriate value if it's the name of a constant field in the
class that we're analysing. |
public String | asString(String code) Return a constant value as a String. |
final public String | getClassName() Return the name of the analyzed class. |
final protected Map | getFieldCache() Exposes the field cache to subclasses:
a Map from String field name to object value. |
public Set | getNames(String namePrefix) Return all names of the given group of constants.
Note that this method assumes that constants are named
in accordance with the standard Java convention for constant
values (i.e. |
public Set | getNamesForProperty(String propertyName) Return all names of the group of constants for the
given bean property name. |
public Set | getNamesForSuffix(String nameSuffix) Return all names of the given group of constants.
Note that this method assumes that constants are named
in accordance with the standard Java convention for constant
values (i.e. |
final public int | getSize() Return the number of constants exposed. |
public Set | getValues(String namePrefix) Return all values of the given group of constants.
Note that this method assumes that constants are named
in accordance with the standard Java convention for constant
values (i.e. |
public Set | getValuesForProperty(String propertyName) Return all values of the group of constants for the
given bean property name. |
public Set | getValuesForSuffix(String nameSuffix) Return all values of the given group of constants.
Note that this method assumes that constants are named
in accordance with the standard Java convention for constant
values (i.e. |
public String | propertyToConstantNamePrefix(String propertyName) Convert the given bean property name to a constant name prefix. |
public String | toCode(Object value, String namePrefix) Look up the given value within the given group of constants. |
public String | toCodeForProperty(Object value, String propertyName) Look up the given value within the group of constants for
the given bean property name. |
public String | toCodeForSuffix(Object value, String nameSuffix) Look up the given value within the given group of constants. |