public class BeanPropertyPointer extends PropertyPointer
Type | Property and Description |
---|---|
protected boolean |
isActual
Learn whether this pointer references an actual property.
|
bean, propertyIndex, UNSPECIFIED_PROPERTY
index, 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.
|
Object |
getBaseValue()
Get the value of the currently selected property.
|
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.
|
protected PropertyDescriptor[] |
getPropertyDescriptors()
Get all PropertyDescriptors.
|
String |
getPropertyName()
Get the name of the currently selected property.
|
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(String propertyName)
Select a property by name.
|
void |
setValue(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, isLeaf
asPath, attributeIterator, childIterator, clone, compareTo, createAttribute, escape, getAbstractFactory, getDefaultNamespaceURI, getImmediateParentPointer, getIndex, getLocale, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeSetByKey, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, getValuePointer, handle, handle, isAttribute, isDefaultNamespace, isLanguage, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, setAttribute, setExceptionHandler, setNamespaceResolver, testNode, toString, verify
isActualProperty
in class PropertyPointer
public BeanPropertyPointer(NodePointer parent, JXPathBeanInfo beanInfo)
parent
- parent pointerbeanInfo
- describes the target property/ies.public boolean isContainer()
isContainer
in class NodePointer
public int getPropertyCount()
PropertyPointer
getPropertyCount
in class PropertyPointer
public String[] getPropertyNames()
getPropertyNames
in class PropertyPointer
public void setPropertyName(String propertyName)
setPropertyName
in class PropertyPointer
propertyName
- String namepublic void setPropertyIndex(int index)
setPropertyIndex
in class PropertyPointer
index
- property indexpublic Object getBaseValue()
getBaseValue
in class NodePointer
public void setIndex(int index)
NodePointer
setIndex
in class NodePointer
index
- intpublic Object getImmediateNode()
getImmediateNode
in class PropertyPointer
protected boolean isActualProperty()
PropertyPointer
isActualProperty
in class PropertyPointer
public boolean isCollection()
NodePointer
true
if the value of the pointer is an array or
a Collection.isCollection
in class PropertyPointer
public int getLength()
getLength
in class PropertyPointer
public void setValue(Object value)
setValue
in interface Pointer
setValue
in class NodePointer
value
- value to setpublic NodePointer createPath(JXPathContext context)
NodePointer
createPath
in class PropertyPointer
context
- the owning JXPathContextpublic void remove()
NodePointer
remove
in class NodePointer
public String getPropertyName()
getPropertyName
in class PropertyPointer
protected PropertyDescriptor[] getPropertyDescriptors()
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.