java.io.Serializable
, java.lang.Cloneable
, java.lang.Comparable
, Pointer
public class DynaBeanPropertyPointer extends PropertyPointer
DynaBean
. If the target DynaBean is
Serializable, so should this instance be.Modifier and Type | Field | Description |
---|---|---|
private org.apache.commons.beanutils.DynaBean |
dynaBean |
|
private java.lang.String |
name |
|
private java.lang.String[] |
names |
|
private static long |
serialVersionUID |
index, locale, parent, UNKNOWN_NAMESPACE, WHOLE_COLLECTION
bean, propertyIndex, UNSPECIFIED_PROPERTY
Constructor | Description |
---|---|
DynaBeanPropertyPointer(NodePointer parent,
org.apache.commons.beanutils.DynaBean dynaBean) |
Create a new DynaBeanPropertyPointer.
|
Modifier and Type | Method | Description |
---|---|---|
private java.lang.Object |
convert(java.lang.Object value,
boolean element) |
Convert a value to the appropriate property type.
|
java.lang.Object |
getBaseValue() |
Returns the value represented by the pointer before indexing.
|
java.lang.Object |
getImmediateNode() |
If index == WHOLE_COLLECTION, the value of the property, otherwise
the value of the index'th element of the collection represented by the
property.
|
int |
getPropertyCount() |
Count the number of properties represented.
|
int |
getPropertyIndex() |
Index of the currently selected property in the list of all
properties sorted alphabetically.
|
java.lang.String |
getPropertyName() |
Returns the name of the currently selected property or "*"
if none has been selected.
|
java.lang.String[] |
getPropertyNames() |
Get the names of the included properties.
|
protected boolean |
isActualProperty() |
Returns true if the bean has the currently selected property.
|
boolean |
isContainer() |
This type of node is auxiliary.
|
protected boolean |
isIndexedProperty() |
Learn whether the property referenced is an indexed property.
|
void |
remove() |
Remove the node of the object graph this pointer points to.
|
void |
setPropertyIndex(int index) |
Index a property by its index in the list of all
properties sorted alphabetically.
|
void |
setPropertyName(java.lang.String propertyName) |
Select a property by name.
|
private void |
setValue(int index,
java.lang.Object value) |
Set an indexed value.
|
void |
setValue(java.lang.Object value) |
If index == WHOLE_COLLECTION, change the value of the property, otherwise
change the value of the index'th element of the collection
represented by the property.
|
asPath, attributeIterator, childIterator, clone, compareTo, createAttribute, escape, getAbstractFactory, getDefaultNamespaceURI, getImmediateParentPointer, getIndex, getLocale, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeSetByKey, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, getValuePointer, isAttribute, isDefaultNamespace, isLanguage, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, setAttribute, setIndex, setNamespaceResolver, testNode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compareChildNodePointers, createChild, createChild, createPath, createPath, equals, getBean, getImmediateValuePointer, getLength, getName, hashCode, isActual, isCollection, isLeaf
private org.apache.commons.beanutils.DynaBean dynaBean
private java.lang.String name
private java.lang.String[] names
private static final long serialVersionUID
public DynaBeanPropertyPointer(NodePointer parent, org.apache.commons.beanutils.DynaBean dynaBean)
parent
- pointerdynaBean
- pointedpublic java.lang.Object getBaseValue()
NodePointer
getBaseValue
in class NodePointer
public boolean isContainer()
isContainer
in class NodePointer
public int getPropertyCount()
PropertyPointer
getPropertyCount
in class PropertyPointer
public java.lang.String[] getPropertyNames()
PropertyPointer
getPropertyNames
in class PropertyPointer
public java.lang.String getPropertyName()
getPropertyName
in class PropertyPointer
public void setPropertyName(java.lang.String propertyName)
setPropertyName
in class PropertyPointer
propertyName
- to selectpublic int getPropertyIndex()
getPropertyIndex
in class PropertyPointer
public void setPropertyIndex(int index)
setPropertyIndex
in class PropertyPointer
index
- to setpublic java.lang.Object getImmediateNode()
getImmediateNode
in class PropertyPointer
protected boolean isActualProperty()
isActualProperty
in class PropertyPointer
protected boolean isIndexedProperty()
public void setValue(java.lang.Object value)
setValue
in interface Pointer
setValue
in class NodePointer
value
- to setpublic void remove()
NodePointer
remove
in class NodePointer
private void setValue(int index, java.lang.Object value)
index
- to changevalue
- to setprivate java.lang.Object convert(java.lang.Object value, boolean element)
value
- to convertelement
- whether this should be a collection element.