|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.widget.table.ClassUtils
public class ClassUtils
A number of helper classes to retrieve getter and setter methods.
Method Summary | |
---|---|
static String |
capitalize(String s)
Small helper method to capitalize the first character of the given string. |
static Accessor |
getAccessorForProperty(Class<?> clazz,
String propertyName)
Create an Accessor for the given property. |
static Method |
getReadMethod(Class<?> clazz,
String propertyName)
Lookup the getter method for the given property. |
static Class<?> |
getTypeForProperty(Method getter)
Returns the type of the property checking if it actually does return something and wrapping primitives if needed. |
static Method |
getWriteMethod(Class<?> clazz,
String propertyName,
Class<?> propertyType)
Lookup the setter method for the given property. |
static Writer |
getWriterForProperty(Class<?> beanClass,
String propertyName)
Create a Writer for the given property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Method getReadMethod(Class<?> clazz, String propertyName) throws NoSuchMethodError
clazz
- type which contains the property.propertyName
- name of the property.
NoSuchMethodError
public static Class<?> getTypeForProperty(Method getter)
getter
- the method to access the property.
IllegalArgumentException
- if the method has a Void
return type.public static final Method getWriteMethod(Class<?> clazz, String propertyName, Class<?> propertyType)
clazz
- type which contains the property.propertyName
- name of the property.propertyType
- type of the property.
public static String capitalize(String s)
s
- string to capitalize
public static Accessor getAccessorForProperty(Class<?> clazz, String propertyName)
Accessor
for the given property. A property may be nested using the dot character.
clazz
- the type containing the property.propertyName
- the name of the property.
public static Writer getWriterForProperty(Class<?> beanClass, String propertyName)
Writer
for the given property. A property may be nested using the dot character.
clazz
- the type containing the property.propertyName
- the name of the property.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |