public class BeanPropertyPointer extends PropertyPointer
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Object |
baseValue |
private JXPathBeanInfo |
beanInfo |
private java.lang.String[] |
names |
private java.beans.PropertyDescriptor |
propertyDescriptor |
private java.beans.PropertyDescriptor[] |
propertyDescriptors |
private java.lang.String |
propertyName |
private static long |
serialVersionUID |
private static java.lang.Object |
UNINITIALIZED |
private java.lang.Object |
value |
bean, propertyIndex, UNSPECIFIED_PROPERTYindex, locale, parent, UNKNOWN_NAMESPACE, WHOLE_COLLECTION| Constructor and Description |
|---|
BeanPropertyPointer(NodePointer parent,
JXPathBeanInfo beanInfo)
Create a new BeanPropertyPointer.
|
| Modifier and Type | Method and Description |
|---|---|
NodePointer |
createPath(JXPathContext context)
Called by a child pointer when it needs to create a parent object.
|
java.lang.Object |
getBaseValue()
Get the value of the currently selected property.
|
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 |
getLength()
If the property contains a collection, then the length of that
collection, otherwise - 1.
|
int |
getPropertyCount()
Count the number of properties represented.
|
private java.beans.PropertyDescriptor |
getPropertyDescriptor()
Finds the property descriptor corresponding to the current property
index.
|
protected java.beans.PropertyDescriptor[] |
getPropertyDescriptors()
Get all PropertyDescriptors.
|
java.lang.String |
getPropertyName()
Get the name of the currently selected property.
|
java.lang.String[] |
getPropertyNames()
Get the names of all properties, sorted alphabetically
|
protected boolean |
isActualProperty()
Learn whether this pointer references an actual property.
|
boolean |
isCollection()
Returns
true if the value of the pointer is an array or
a Collection. |
boolean |
isContainer()
This type of node is auxiliary.
|
void |
remove()
Remove the node of the object graph this pointer points to.
|
void |
setIndex(int index)
Set the index of this NodePointer.
|
void |
setPropertyIndex(int index)
Selects a property by its offset in the alphabetically sorted list.
|
void |
setPropertyName(java.lang.String propertyName)
Select a property by name.
|
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.
|
compareChildNodePointers, createChild, createChild, createPath, equals, getBean, getImmediateValuePointer, getName, getPropertyIndex, hashCode, isActual, isLeafasPath, 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, setNamespaceResolver, testNode, toStringprivate static final long serialVersionUID
private static final java.lang.Object UNINITIALIZED
private java.lang.String propertyName
private JXPathBeanInfo beanInfo
private java.lang.Object baseValue
private java.lang.Object value
private transient java.lang.String[] names
private transient java.beans.PropertyDescriptor[] propertyDescriptors
private transient java.beans.PropertyDescriptor propertyDescriptor
public BeanPropertyPointer(NodePointer parent, JXPathBeanInfo beanInfo)
parent - parent pointerbeanInfo - describes the target property/ies.public boolean isContainer()
isContainer in class NodePointerpublic int getPropertyCount()
PropertyPointergetPropertyCount in class PropertyPointerpublic java.lang.String[] getPropertyNames()
getPropertyNames in class PropertyPointerpublic void setPropertyName(java.lang.String propertyName)
setPropertyName in class PropertyPointerpropertyName - String namepublic void setPropertyIndex(int index)
setPropertyIndex in class PropertyPointerindex - property indexpublic java.lang.Object getBaseValue()
getBaseValue in class NodePointerpublic void setIndex(int index)
NodePointersetIndex in class NodePointerindex - intpublic java.lang.Object getImmediateNode()
getImmediateNode in class PropertyPointerprotected boolean isActualProperty()
PropertyPointerisActualProperty in class PropertyPointerpublic boolean isCollection()
NodePointertrue if the value of the pointer is an array or
a Collection.isCollection in class PropertyPointerpublic int getLength()
getLength in class PropertyPointerpublic void setValue(java.lang.Object value)
setValue in interface PointersetValue in class NodePointervalue - value to setpublic NodePointer createPath(JXPathContext context)
NodePointercreatePath in class PropertyPointercontext - the owning JXPathContextpublic void remove()
NodePointerremove in class NodePointerpublic java.lang.String getPropertyName()
getPropertyName in class PropertyPointerprivate java.beans.PropertyDescriptor getPropertyDescriptor()
protected java.beans.PropertyDescriptor[] getPropertyDescriptors()