public class ModelPropertyPointer
extends org.apache.commons.jxpath.ri.model.beans.PropertyPointer
Constructor and Description |
---|
ModelPropertyPointer(org.apache.commons.jxpath.ri.model.NodePointer parent,
org.apache.commons.jxpath.JXPathBeanInfo beanInfo,
Class<?> valueClass)
Create a new BeanPropertyPointer.
|
Modifier and Type | Method and Description |
---|---|
org.apache.commons.jxpath.ri.model.NodePointer |
createPath(org.apache.commons.jxpath.JXPathContext context) |
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() |
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() |
boolean |
isCollection() |
boolean |
isContainer()
This type of node is auxiliary.
|
void |
remove() |
void |
setIndex(int index) |
void |
setPropertyIndex(int index)
Selects a property by its offset in the alphabetically sorted list.
|
void |
setPropertyName(String name)
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, isAttribute, isDefaultNamespace, isLanguage, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, setAttribute, setNamespaceResolver, testNode, toString
public ModelPropertyPointer(org.apache.commons.jxpath.ri.model.NodePointer parent, org.apache.commons.jxpath.JXPathBeanInfo beanInfo, Class<?> valueClass)
parent
- parent pointerbeanInfo
- describes the target property/ies.valueClass
- the class of the base objectpublic boolean isContainer()
isContainer
in class org.apache.commons.jxpath.ri.model.NodePointer
public int getPropertyCount()
getPropertyCount
in class org.apache.commons.jxpath.ri.model.beans.PropertyPointer
public String[] getPropertyNames()
getPropertyNames
in class org.apache.commons.jxpath.ri.model.beans.PropertyPointer
public void setPropertyName(String name)
setPropertyName
in class org.apache.commons.jxpath.ri.model.beans.PropertyPointer
name
- String namepublic void setPropertyIndex(int index)
setPropertyIndex
in class org.apache.commons.jxpath.ri.model.beans.PropertyPointer
index
- property indexpublic Object getBaseValue()
getBaseValue
in class org.apache.commons.jxpath.ri.model.NodePointer
public void setIndex(int index)
setIndex
in class org.apache.commons.jxpath.ri.model.NodePointer
public Object getImmediateNode()
getImmediateNode
in class org.apache.commons.jxpath.ri.model.beans.PropertyPointer
protected boolean isActualProperty()
isActualProperty
in class org.apache.commons.jxpath.ri.model.beans.PropertyPointer
public boolean isCollection()
isCollection
in class org.apache.commons.jxpath.ri.model.beans.PropertyPointer
public int getLength()
getLength
in class org.apache.commons.jxpath.ri.model.beans.PropertyPointer
public void setValue(Object value)
setValue
in interface org.apache.commons.jxpath.Pointer
setValue
in class org.apache.commons.jxpath.ri.model.NodePointer
value
- value to setpublic org.apache.commons.jxpath.ri.model.NodePointer createPath(org.apache.commons.jxpath.JXPathContext context)
createPath
in class org.apache.commons.jxpath.ri.model.beans.PropertyPointer
public void remove()
remove
in class org.apache.commons.jxpath.ri.model.NodePointer
public String getPropertyName()
getPropertyName
in class org.apache.commons.jxpath.ri.model.beans.PropertyPointer
protected PropertyDescriptor[] getPropertyDescriptors()
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.