public abstract class Bean
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Bean() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(Property<?,?> property,
java.beans.PropertyChangeListener listener)
Adds a specific property change listener
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a global property change listener
|
java.util.Set<java.lang.String> |
attributeNames()
Returns the names of contextual attributes
|
protected java.beans.PropertyChangeSupport |
changes()
Returns the
PropertyChangeSupport for events on property changes |
abstract java.lang.String |
className() |
void |
clearAttributes()
Removes all attributes
|
void |
copyPropertiesTo(Bean destination)
Copies all the properties from this bean into the given destination bean
|
BeanDataAccessor |
dataAccessor() |
protected java.util.List<Property<?,?>> |
doGetProperties() |
protected void |
firePropertyChange(Property<?,?> property,
java.lang.Object oldValue,
java.lang.Object newValue)
Fires a property change event
|
<T> T |
get(Property<T,? extends Bean> property)
Returns the value of the given property
|
java.lang.Object |
getAttribute(java.lang.String name)
Gets a contextual attribute, or null if none is found
|
void |
initDataAccessor(BeanDataAccessor dataAccessor) |
java.util.List<Property<?,?>> |
properties()
Returns a list with all properties
|
java.util.Map<java.lang.String,Property<?,?>> |
propertyMap()
Returns a map with all properties.
|
boolean |
removeAttribute(java.lang.String name)
Removes the attribute with the given name
|
void |
removePropertyChangeListener(Property<?,?> property,
java.beans.PropertyChangeListener listener)
Removes a specific property change listener
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a global property change listener
|
<T> T |
set(Property<T,?> property,
T value)
Sets the value for the given property
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets a contextual attribute
|
public void addPropertyChangeListener(Property<?,?> property, java.beans.PropertyChangeListener listener)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public java.util.Set<java.lang.String> attributeNames()
public abstract java.lang.String className()
public void clearAttributes()
public void copyPropertiesTo(Bean destination)
public BeanDataAccessor dataAccessor()
public final <T> T get(Property<T,? extends Bean> property)
java.lang.IllegalArgumentException - When the property is invalidpublic java.lang.Object getAttribute(java.lang.String name)
public void initDataAccessor(BeanDataAccessor dataAccessor)
public final java.util.List<Property<?,?>> properties()
public java.util.Map<java.lang.String,Property<?,?>> propertyMap()
public boolean removeAttribute(java.lang.String name)
public void removePropertyChangeListener(Property<?,?> property, java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public final <T> T set(Property<T,?> property, T value)
public void setAttribute(java.lang.String name,
java.lang.Object value)
protected java.beans.PropertyChangeSupport changes()
PropertyChangeSupport for events on property changesprotected java.util.List<Property<?,?>> doGetProperties()
protected void firePropertyChange(Property<?,?> property, java.lang.Object oldValue, java.lang.Object newValue)