|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.util.beans.BeanUtil
public class BeanUtil
Usefull methods around the PropertyChangeListener.
| Field Summary | |
|---|---|
static String |
ADD_PROPERTY_CHANGE_LISTENER
|
static String |
REMOVE_PROPERTY_CHANGE_LISTENER
|
| Constructor Summary | |
|---|---|
protected |
BeanUtil()
|
| Method Summary | |
|---|---|
static void |
addPropertyChangeListener(PropertyChangeListener listener,
Object bean)
Add the given listener to the given bean using the
normalized method named addPropertyChangeListener. |
static Set<String> |
getReadableProperties(Class<?> beanType)
Obtains all readable properties from a given type. |
protected static void |
getReadableProperties(Class<?> beanType,
Set<String> result)
|
protected static void |
getReadableProperties(Class<?> beanType,
Set<String> result,
Set<Class<?>> exploredTypes)
|
static Set<String> |
getWriteableProperties(Class<?> beanType)
Obtains all writeable properties from a given type. |
protected static void |
getWriteableProperties(Class<?> beanType,
Set<String> result)
|
protected static void |
getWriteableProperties(Class<?> beanType,
Set<String> result,
Set<Class<?>> exploredTypes)
|
static boolean |
isJavaBeanCompiliant(Class<?> type)
Test if the given type is JavaBean compiliant, says that it has two public methods : addPropertyChangeListener
removePropertyChangeListener
|
static void |
removePropertyChangeListener(PropertyChangeListener listener,
Object bean)
Remove the given listener from the given bean using the
normalized method named removePropertyChangeListener. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ADD_PROPERTY_CHANGE_LISTENER
public static final String REMOVE_PROPERTY_CHANGE_LISTENER
| Constructor Detail |
|---|
protected BeanUtil()
| Method Detail |
|---|
public static boolean isJavaBeanCompiliant(Class<?> type)
addPropertyChangeListenerremovePropertyChangeListener
type - type to test
true if type is Javabean compiliant, false
otherwise
public static void addPropertyChangeListener(PropertyChangeListener listener,
Object bean)
throws InvocationTargetException,
NoSuchMethodException,
IllegalAccessException
listener to the given bean using the
normalized method named addPropertyChangeListener.
listener - the listener to addbean - the bean on which the listener is added
InvocationTargetException - if could not invoke the method
addPropertyChangeListener
NoSuchMethodException - if method
addPropertyChangeListener
does not exist on given bean
IllegalAccessException - if an illegal access occurs when
invoking the method
addPropertyChangeListener
public static void removePropertyChangeListener(PropertyChangeListener listener,
Object bean)
throws InvocationTargetException,
NoSuchMethodException,
IllegalAccessException
listener from the given bean using the
normalized method named removePropertyChangeListener.
listener - the listener to removebean - the bean on which the listener is removed
InvocationTargetException - if could not invoke the method
removePropertyChangeListener
NoSuchMethodException - if method
removePropertyChangeListener
does not exist on given bean
IllegalAccessException - if an illegal access occurs when
invoking the method
removePropertyChangeListenerpublic static Set<String> getReadableProperties(Class<?> beanType)
beanType - the type to seek
public static Set<String> getWriteableProperties(Class<?> beanType)
beanType - the type to seek
protected static void getReadableProperties(Class<?> beanType,
Set<String> result,
Set<Class<?>> exploredTypes)
protected static void getReadableProperties(Class<?> beanType,
Set<String> result)
protected static void getWriteableProperties(Class<?> beanType,
Set<String> result,
Set<Class<?>> exploredTypes)
protected static void getWriteableProperties(Class<?> beanType,
Set<String> result)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||