|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.util.property.PropertyAdapter org.jboss.util.property.BoundPropertyAdapter org.jboss.util.property.MethodBoundPropertyListener
Binds property values to class methods.
Field Summary | |
protected PropertyDescriptor |
descriptor
Property descriptor |
protected Object |
instance
Instance object that contains setter method |
protected String |
propertyName
Property name which we are bound to |
protected Method |
setter
Property setter method |
Constructor Summary | |
MethodBoundPropertyListener(Object instance,
String propertyName)
Construct a MethodBoundPropertyListener. |
|
MethodBoundPropertyListener(Object instance,
String propertyName,
String beanPropertyName)
Construct a MethodBoundPropertyListener. |
Method Summary | |
String |
getPropertyName()
Get the property name which this listener is bound to. |
protected void |
invokeSetter(String value)
Coerce and invoke the property setter method on the instance. |
void |
propertyAdded(PropertyEvent event)
Notifies that a property has been added. |
void |
propertyBound(PropertyMap map)
Notifies that this listener was bound to a property. |
void |
propertyChanged(PropertyEvent event)
Notifies that a property has changed. |
Methods inherited from class org.jboss.util.property.BoundPropertyAdapter |
propertyUnbound |
Methods inherited from class org.jboss.util.property.PropertyAdapter |
propertyRemoved |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.util.property.PropertyListener |
propertyRemoved |
Field Detail |
protected final String propertyName
protected final Object instance
protected final Method setter
protected final PropertyDescriptor descriptor
Constructor Detail |
public MethodBoundPropertyListener(Object instance, String propertyName, String beanPropertyName)
instance
- Instance object that contains setter method.propertyName
- The name of the property which will be bound.beanPropertyName
- The name of the property setter method.
PropertyException
public MethodBoundPropertyListener(Object instance, String propertyName)
instance
- Instance object that contains setter method.propertyName
- The name of the property which will be bound.Method Detail |
public final String getPropertyName()
protected void invokeSetter(String value)
value
- Method value.
PropertyException
- Failed to invoke setter method.public void propertyAdded(PropertyEvent event)
propertyAdded
in interface PropertyListener
propertyAdded
in class PropertyAdapter
event
- Property event.public void propertyChanged(PropertyEvent event)
propertyChanged
in interface PropertyListener
propertyChanged
in class PropertyAdapter
event
- Property event.public void propertyBound(PropertyMap map)
propertyBound
in interface BoundPropertyListener
propertyBound
in class BoundPropertyAdapter
map
- PropertyMap which contains property bound to.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |