public class MethodBoundPropertyListener extends BoundPropertyAdapter
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
MethodBoundPropertyListener(Object instance,
String propertyName)
Construct a MethodBoundPropertyListener.
|
MethodBoundPropertyListener(Object instance,
String propertyName,
String beanPropertyName)
Construct a MethodBoundPropertyListener.
|
Modifier and Type | Method and Description |
---|---|
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.
|
propertyUnbound
propertyRemoved
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
propertyRemoved
protected final String propertyName
protected final Object instance
protected final Method setter
protected final PropertyDescriptor descriptor
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 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.Copyright © 2018 JBoss by Red Hat. All rights reserved.