org.apache.commons.jxpath.ri.model.dynabeans
Class DynaBeanPointer

java.lang.Object
  extended byorg.apache.commons.jxpath.ri.model.NodePointer
      extended byorg.apache.commons.jxpath.ri.model.beans.PropertyOwnerPointer
          extended byorg.apache.commons.jxpath.ri.model.dynabeans.DynaBeanPointer
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, Pointer, java.io.Serializable

public class DynaBeanPointer
extends PropertyOwnerPointer

A Pointer that points to a DynaBean.

Version:
$Revision: 1.6 $ $Date: 2004/02/29 14:17:40 $
Author:
Dmitri Plotnikov
See Also:
Serialized Form

Field Summary
private  org.apache.commons.beanutils.DynaBean dynaBean
           
private  QName name
           
 
Fields inherited from class org.apache.commons.jxpath.ri.model.beans.PropertyOwnerPointer
 
Fields inherited from class org.apache.commons.jxpath.ri.model.NodePointer
index, locale, parent, UNKNOWN_NAMESPACE, WHOLE_COLLECTION
 
Constructor Summary
DynaBeanPointer(NodePointer parent, QName name, org.apache.commons.beanutils.DynaBean dynaBean)
           
DynaBeanPointer(QName name, org.apache.commons.beanutils.DynaBean dynaBean, java.util.Locale locale)
           
 
Method Summary
 java.lang.String asPath()
          If there's a parent - parent's path, otherwise "/".
 boolean equals(java.lang.Object object)
           
 java.lang.Object getBaseValue()
          Returns the bean itself
 java.lang.Object getImmediateNode()
          Returns the object the pointer points to; does not convert it to a "canonical" type.
 int getLength()
          Returns 1.
 QName getName()
          Returns the name of this node.
 PropertyPointer getPropertyPointer()
           
 int hashCode()
           
 boolean isCollection()
          Returns true if the value of the pointer is an array or a Collection.
 boolean isLeaf()
          If true, this node does not have children
 
Methods inherited from class org.apache.commons.jxpath.ri.model.beans.PropertyOwnerPointer
attributeIterator, childIterator, compareChildNodePointers, createNodeIterator, isDynamicPropertyDeclarationSupported, remove, setIndex, setValue
 
Methods inherited from class org.apache.commons.jxpath.ri.model.NodePointer
clone, compareTo, createAttribute, createChild, createChild, createPath, createPath, getDefaultNamespaceURI, getImmediateParentPointer, getImmediateValuePointer, getIndex, getLocale, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, getValuePointer, isActual, isAttribute, isContainer, 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
 

Field Detail

name

private QName name

dynaBean

private org.apache.commons.beanutils.DynaBean dynaBean
Constructor Detail

DynaBeanPointer

public DynaBeanPointer(QName name,
                       org.apache.commons.beanutils.DynaBean dynaBean,
                       java.util.Locale locale)

DynaBeanPointer

public DynaBeanPointer(NodePointer parent,
                       QName name,
                       org.apache.commons.beanutils.DynaBean dynaBean)
Parameters:
name - is the name given to the first node
Method Detail

getPropertyPointer

public PropertyPointer getPropertyPointer()
Specified by:
getPropertyPointer in class PropertyOwnerPointer

getName

public QName getName()
Description copied from class: NodePointer
Returns the name of this node. Can be null.

Specified by:
getName in class PropertyOwnerPointer

getBaseValue

public java.lang.Object getBaseValue()
Returns the bean itself

Specified by:
getBaseValue in class NodePointer

getImmediateNode

public java.lang.Object getImmediateNode()
Description copied from class: NodePointer
Returns the object the pointer points to; does not convert it to a "canonical" type.

Overrides:
getImmediateNode in class PropertyOwnerPointer

isCollection

public boolean isCollection()
Description copied from class: NodePointer
Returns true if the value of the pointer is an array or a Collection.

Specified by:
isCollection in class NodePointer

getLength

public int getLength()
Returns 1.

Specified by:
getLength in class NodePointer

isLeaf

public boolean isLeaf()
Description copied from class: NodePointer
If true, this node does not have children

Specified by:
isLeaf in class NodePointer

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object object)

asPath

public java.lang.String asPath()
If there's a parent - parent's path, otherwise "/".

Specified by:
asPath in interface Pointer
Overrides:
asPath in class NodePointer