Class DynamicPointer
java.lang.Object
org.apache.commons.jxpath.ri.model.NodePointer
org.apache.commons.jxpath.ri.model.beans.PropertyOwnerPointer
org.apache.commons.jxpath.ri.model.dynamic.DynamicPointer
- All Implemented Interfaces:
Serializable,Cloneable,Comparable,Pointer
A Pointer that points to an object with Dynamic Properties. It is used for the first element of a path; following elements will by of type
PropertyPointer.- See Also:
-
Field Summary
Fields inherited from class org.apache.commons.jxpath.ri.model.NodePointer
index, locale, parent, UNKNOWN_NAMESPACE, WHOLE_COLLECTION -
Constructor Summary
ConstructorsConstructorDescriptionDynamicPointer(NodePointer parent, QName qName, Object bean, DynamicPropertyHandler handler) Constructs a new DynamicPointer.DynamicPointer(QName qName, Object bean, DynamicPropertyHandler handler, Locale locale) Constructs a new DynamicPointer. -
Method Summary
Modifier and TypeMethodDescriptionasPath()Returns an XPath that maps to this Pointer.attributeIterator(QName qName) Returns a NodeIterator that iterates over all attributes of the current node matching the supplied node name (could have a wildcard).createNodeIterator(String property, boolean reverse, NodePointer startWith) Create a NodeIterator.booleanReturns the DP object iself.intReturns 1.getName()Gets the name of this node.Gets a PropertyPointer for this PropertyOwnerPointer.inthashCode()booleanReturnstrueif the value of the pointer is an array or a Collection.booleanTests whether dynamic property declaration is supported.booleanisLeaf()If true, this node does not have childrenMethods inherited from class org.apache.commons.jxpath.ri.model.beans.PropertyOwnerPointer
childIterator, compareChildNodePointers, getImmediateNode, isValidProperty, remove, setIndex, setValueMethods inherited from class org.apache.commons.jxpath.ri.model.NodePointer
clone, compareTo, createAttribute, createChild, createChild, createPath, createPath, escape, getAbstractFactory, getDefaultNamespaceURI, getImmediateParentPointer, getImmediateValuePointer, getIndex, getLocale, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeSetByKey, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, getValuePointer, handle, handle, isActual, isAttribute, isContainer, isDefaultNamespace, isLanguage, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, setAttribute, setExceptionHandler, setNamespaceResolver, testNode, toString, verify
-
Constructor Details
-
DynamicPointer
Constructs a new DynamicPointer.- Parameters:
parent- parent pointerqName- property namebean- owning beanhandler- DynamicPropertyHandler
-
DynamicPointer
Constructs a new DynamicPointer.- Parameters:
qName- property namebean- owning beanhandler- DynamicPropertyHandlerlocale- Locale
-
-
Method Details
-
asPath
Description copied from class:NodePointerReturns an XPath that maps to this Pointer.- Specified by:
asPathin interfacePointer- Overrides:
asPathin classNodePointer- Returns:
- String XPath expression
-
attributeIterator
Description copied from class:NodePointerReturns a NodeIterator that iterates over all attributes of the current node matching the supplied node name (could have a wildcard). May return null if the object does not support the attributes.- Overrides:
attributeIteratorin classPropertyOwnerPointer- Parameters:
qName- the attribute name to test- Returns:
- NodeIterator
-
createNodeIterator
Description copied from class:PropertyOwnerPointerCreate a NodeIterator.- Overrides:
createNodeIteratorin classPropertyOwnerPointer- Parameters:
property- property namereverse- whether to iterate in reversestartWith- first pointer to return- Returns:
- NodeIterator
-
equals
-
getBaseValue
Returns the DP object iself.- Specified by:
getBaseValuein classNodePointer- Returns:
- Object
-
getLength
Returns 1.- Specified by:
getLengthin classNodePointer- Returns:
- int
-
getName
Description copied from class:NodePointerGets the name of this node. Can be null.- Specified by:
getNamein classPropertyOwnerPointer- Returns:
- QName The name of this node. Can be null.
-
getPropertyPointer
Description copied from class:PropertyOwnerPointerGets a PropertyPointer for this PropertyOwnerPointer.- Specified by:
getPropertyPointerin classPropertyOwnerPointer- Returns:
- PropertyPointer
-
hashCode
-
isCollection
Description copied from class:NodePointerReturnstrueif the value of the pointer is an array or a Collection.- Specified by:
isCollectionin classNodePointer- Returns:
- boolean
-
isDynamicPropertyDeclarationSupported
Description copied from class:PropertyOwnerPointerTests whether dynamic property declaration is supported.- Overrides:
isDynamicPropertyDeclarationSupportedin classPropertyOwnerPointer- Returns:
- true if the property owner can set a property "does not exist". A good example is a Map. You can always assign a value to any key even if it has never been "declared".
-
isLeaf
Description copied from class:NodePointerIf true, this node does not have children- Specified by:
isLeafin classNodePointer- Returns:
- boolean
-