|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.util.beans.BeanPropertyAdapter
org.progeeks.meta.util.PropertyAdapter
public class PropertyAdapter
A bit of a general utility class singleton that stands as the entry point for adapting bean or meta-object-like property access to various object types in a unified way. Basically, this allows code to treat a bean or a meta-object the same for certain operations and can potentially be expanded to include registration for other types of converters. For now, just beans and MetaObjects are good enough. It also handles listener registration for ObservableLists. This implementation includes a few extra methods not found in a standard PropertyAccess object. These provide extra value for calling code that is already in a meta-object environment.
Constructor Summary | |
---|---|
PropertyAdapter()
|
Method Summary | |
---|---|
boolean |
addPropertyChangeListener(java.lang.Object object,
java.beans.PropertyChangeListener listener)
Adds the specified property change listener to the specified object using whatever implementation specific way is most friendly. |
boolean |
addPropertyChangeListener(java.lang.Object object,
java.lang.String property,
java.beans.PropertyChangeListener listener)
Adds the specified property change listener to the specified object using whatever implementation specific way is most friendly. |
static PropertyAccess |
getInstance()
|
java.lang.Object |
getProperty(java.lang.Object object,
java.lang.String property)
Returns the specified property from the specified object in whatever implementation specific way is most friendly. |
java.lang.Class |
getPropertyClass(java.lang.Object object,
java.lang.String property)
Returns the Java type for the specified property on the specified object. |
PropertyType |
getPropertyType(java.lang.Object object,
java.lang.String property)
Returns the best-match PropertyType for the specified property on the specified object. |
boolean |
hasProperty(java.lang.Object object,
java.lang.String property)
Returns true if the specified object appears to have the specified property. |
boolean |
removePropertyChangeListener(java.lang.Object object,
java.beans.PropertyChangeListener listener)
Removes a previously registered property change listener from the specified object using whatever implementation specific way is most friendly. |
boolean |
removePropertyChangeListener(java.lang.Object object,
java.lang.String property,
java.beans.PropertyChangeListener listener)
Removes a previously registered property change listener from the specified object using whatever implementation specific way is most friendly. |
void |
setProperty(java.lang.Object object,
java.lang.String property,
java.lang.Object value)
Sets the specified property on the specified object to the specified value using whatever implementation specific way is most friendly. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyAdapter()
Method Detail |
---|
public static PropertyAccess getInstance()
public java.lang.Object getProperty(java.lang.Object object, java.lang.String property)
getProperty
in interface PropertyAccess
getProperty
in class BeanPropertyAdapter
public boolean hasProperty(java.lang.Object object, java.lang.String property)
hasProperty
in interface PropertyAccess
hasProperty
in class BeanPropertyAdapter
public void setProperty(java.lang.Object object, java.lang.String property, java.lang.Object value)
setProperty
in interface PropertyAccess
setProperty
in class BeanPropertyAdapter
public PropertyType getPropertyType(java.lang.Object object, java.lang.String property)
public java.lang.Class getPropertyClass(java.lang.Object object, java.lang.String property)
getPropertyClass
in interface PropertyAccess
getPropertyClass
in class BeanPropertyAdapter
public boolean addPropertyChangeListener(java.lang.Object object, java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface PropertyAccess
addPropertyChangeListener
in class BeanPropertyAdapter
public boolean addPropertyChangeListener(java.lang.Object object, java.lang.String property, java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface PropertyAccess
addPropertyChangeListener
in class BeanPropertyAdapter
public boolean removePropertyChangeListener(java.lang.Object object, java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface PropertyAccess
removePropertyChangeListener
in class BeanPropertyAdapter
public boolean removePropertyChangeListener(java.lang.Object object, java.lang.String property, java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface PropertyAccess
removePropertyChangeListener
in class BeanPropertyAdapter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |