|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.jxpath.ri.model.NodePointer
org.apache.commons.jxpath.ri.model.beans.PropertyPointer
org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer
public class BeanPropertyPointer
Pointer pointing to a property of a JavaBean.
| Field Summary |
|---|
| Fields inherited from class org.apache.commons.jxpath.ri.model.beans.PropertyPointer |
|---|
bean, propertyIndex, UNSPECIFIED_PROPERTY |
| Fields inherited from class org.apache.commons.jxpath.ri.model.NodePointer |
|---|
index, locale, parent, UNKNOWN_NAMESPACE, WHOLE_COLLECTION |
| Constructor Summary | |
|---|---|
BeanPropertyPointer(NodePointer parent,
JXPathBeanInfo beanInfo)
Create a new BeanPropertyPointer. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.apache.commons.jxpath.ri.model.beans.PropertyPointer |
|---|
compareChildNodePointers, createChild, createChild, createPath, equals, getBean, getImmediateValuePointer, getName, getPropertyIndex, hashCode, isActual, isLeaf |
| Methods inherited from class org.apache.commons.jxpath.ri.model.NodePointer |
|---|
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, setNamespaceResolver, testNode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BeanPropertyPointer(NodePointer parent,
JXPathBeanInfo beanInfo)
parent - parent pointerbeanInfo - describes the target property/ies.| Method Detail |
|---|
public boolean isContainer()
isContainer in class NodePointerpublic int getPropertyCount()
PropertyPointer
getPropertyCount in class PropertyPointerpublic String[] getPropertyNames()
getPropertyNames in class PropertyPointerpublic void setPropertyName(String propertyName)
setPropertyName in class PropertyPointerpropertyName - String namepublic void setPropertyIndex(int index)
setPropertyIndex in class PropertyPointerindex - property indexpublic Object getBaseValue()
getBaseValue in class NodePointerpublic void setIndex(int index)
NodePointer
setIndex in class NodePointerindex - intpublic Object getImmediateNode()
getImmediateNode in class PropertyPointerprotected boolean isActualProperty()
PropertyPointer
isActualProperty 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(Object value)
setValue in interface PointersetValue in class NodePointervalue - value to setpublic NodePointer createPath(JXPathContext context)
NodePointer
createPath in class PropertyPointercontext - the owning JXPathContext
public void remove()
NodePointer
remove in class NodePointerpublic String getPropertyName()
getPropertyName in class PropertyPointerprotected PropertyDescriptor[] getPropertyDescriptors()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||