|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.joda.property.impl.PropertyHelper
Static class to aid with the creation of hard coded, not proxy generated ModelProperty implementations.
Method Summary | |
static java.lang.String |
capitalize(java.lang.String str)
Capitalizes a String |
static java.lang.String |
capitalizeFirstSection(java.lang.String str)
Recapitalize the string, by capitalizing everything up to the first capital |
static java.lang.String |
decapitalize(java.lang.String name)
Utility method to take a string and convert it to normal Java variable name capitalization. |
static java.lang.Class |
getBaseTypeFromGetter(java.lang.Class cls,
java.lang.String name)
Get the type of a property from its name and class by looking for a matching get method. |
static java.lang.Class |
getBaseTypeFromProperty(java.lang.Class cls)
Get the type of a property from the static DEFAULT_TYPE field that should be declared on every property interface. |
static java.lang.reflect.Method |
getIndexedPropertyMethod(java.lang.Class cls,
java.lang.String name)
Get the method object for an indexed property by name. |
static java.lang.reflect.Method |
getPropertyMethod(java.lang.Class cls,
java.lang.String name)
Get the method object for a property by name. |
static java.lang.String |
makeGetter(java.lang.String str)
Convert the property name into a getter method name |
static java.lang.String |
makeIser(java.lang.String str)
Convert the property name into an is method name |
static java.lang.String |
makeProperty(java.lang.String name)
Convert the getter or setter to a property name. |
static java.lang.String |
makeProperty(java.lang.String str,
int prefixLength)
Convert the getter or setter to a property name. |
static java.lang.String |
makeSetter(java.lang.String str)
Convert the property name into a setter method name |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String decapitalize(java.lang.String name)
Thus "FooBah" becomes "fooBah" and "X" becomes "x", but "URL" stays as "URL".
(From java.beans.Introspector)
name
- The string to be decapitalized.
public static java.lang.String capitalize(java.lang.String str)
public static java.lang.String capitalizeFirstSection(java.lang.String str)
public static java.lang.String makeGetter(java.lang.String str)
str
- string to be converted to a getter
public static java.lang.String makeIser(java.lang.String str)
str
- string to be converted to a is type getter
public static java.lang.String makeSetter(java.lang.String str)
str
- string to be converted to a setter
public static java.lang.String makeProperty(java.lang.String str, int prefixLength)
str
- string to be converted to a propertyprefixLength
- the length of the prefix, 3 for get/set, 2 for is
public static java.lang.String makeProperty(java.lang.String name)
public static java.lang.Class getBaseTypeFromGetter(java.lang.Class cls, java.lang.String name)
cls
- the class to search inname
- the property name
public static java.lang.Class getBaseTypeFromProperty(java.lang.Class cls)
cls
- the property class to search
public static java.lang.reflect.Method getPropertyMethod(java.lang.Class cls, java.lang.String name)
cls
- the class to search inname
- the name, either a getter or property name
public static java.lang.reflect.Method getIndexedPropertyMethod(java.lang.Class cls, java.lang.String name)
cls
- the class to search inname
- the name, either a getter or property name
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |