public interface Instance
extends java.io.Serializable
Modifier and Type | Interface and Description |
---|---|
static class |
Instance.PropertyChangeEvent
Event object for
Instance.PropertyChangeListener . |
static interface |
Instance.PropertyChangeListener
Interface to track changes in data model objects.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(ValueListener listener)
Deprecated.
|
void |
addPropertyChangeListener(Instance.PropertyChangeListener listener)
Add listener to track attributes changes.
|
java.lang.String |
getInstanceName() |
MetaClass |
getMetaClass() |
<T> T |
getValue(java.lang.String name)
Get an attribute value.
|
<T> T |
getValueEx(java.lang.String propertyPath)
Get an attribute value.
|
void |
removeAllListeners()
Remove all
Instance.PropertyChangeListener s. |
void |
removeListener(ValueListener listener)
Deprecated.
|
void |
removePropertyChangeListener(Instance.PropertyChangeListener listener)
Remove listener.
|
void |
setValue(java.lang.String name,
java.lang.Object value)
Set an attribute value.
|
void |
setValueEx(java.lang.String propertyPath,
java.lang.Object value)
Set an attribute value.
|
MetaClass getMetaClass()
java.lang.String getInstanceName()
NamePattern
or toString()
.@Nullable <T> T getValue(java.lang.String name)
name
- attribute name according to JavaBeans notationvoid setValue(java.lang.String name, java.lang.Object value)
Instance.PropertyChangeListener
s only if the attribute
was actually changed.name
- attribute name according to JavaBeans notationvalue
- attribute value@Nullable <T> T getValueEx(java.lang.String propertyPath)
car.driver.name
.propertyPath
- path to an attributeInstance
, this method
stops here and returns this value.void setValueEx(java.lang.String propertyPath, java.lang.Object value)
car.driver.name
.
car.driver
attribute, and if it is not
null and is an Instance
, sets value of name
attribute in it. If the value returned from
getValueEx("car.driver")
is null or is not an Instance
, this method throws
IllegalStateException
.
Instance.PropertyChangeListener
s only if the attribute
was actually changed.propertyPath
- path to an attributevalue
- attribute value@Deprecated void addListener(ValueListener listener)
addPropertyChangeListener(PropertyChangeListener)
listener
- listener@Deprecated void removeListener(ValueListener listener)
removePropertyChangeListener(PropertyChangeListener)
listener
- listener to removevoid addPropertyChangeListener(Instance.PropertyChangeListener listener)
listener
- listenervoid removePropertyChangeListener(Instance.PropertyChangeListener listener)
listener
- listener to removevoid removeAllListeners()
Instance.PropertyChangeListener
s.