Class DynamicPointer

All Implemented Interfaces:
Serializable, Cloneable, Comparable, Pointer

public class DynamicPointer extends PropertyOwnerPointer
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.
Version:
$Revision: 652884 $ $Date: 2008-05-02 15:02:00 -0500 (Fri, 02 May 2008) $
See Also:
  • Field Details

  • Constructor Details

    • DynamicPointer

      public DynamicPointer(QName name, Object bean, DynamicPropertyHandler handler, Locale locale)
      Create a new DynamicPointer.
      Parameters:
      name - property name
      bean - owning bean
      handler - DynamicPropertyHandler
      locale - Locale
    • DynamicPointer

      public DynamicPointer(NodePointer parent, QName name, Object bean, DynamicPropertyHandler handler)
      Create a new DynamicPointer.
      Parameters:
      parent - parent pointer
      name - property name
      bean - owning bean
      handler - DynamicPropertyHandler
  • Method Details

    • getPropertyPointer

      public PropertyPointer getPropertyPointer()
      Description copied from class: PropertyOwnerPointer
      Get a PropertyPointer for this PropertyOwnerPointer.
      Specified by:
      getPropertyPointer in class PropertyOwnerPointer
      Returns:
      PropertyPointer
    • createNodeIterator

      public NodeIterator createNodeIterator(String property, boolean reverse, NodePointer startWith)
      Description copied from class: PropertyOwnerPointer
      Create a NodeIterator.
      Overrides:
      createNodeIterator in class PropertyOwnerPointer
      Parameters:
      property - property name
      reverse - whether to iterate in reverse
      startWith - first pointer to return
      Returns:
      NodeIterator
    • attributeIterator

      public NodeIterator attributeIterator(QName name)
      Description copied from class: NodePointer
      Returns 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:
      attributeIterator in class PropertyOwnerPointer
      Parameters:
      name - the attribute name to test
      Returns:
      NodeIterator
    • getName

      public QName getName()
      Description copied from class: NodePointer
      Returns the name of this node. Can be null.
      Specified by:
      getName in class PropertyOwnerPointer
      Returns:
      QName
    • isDynamicPropertyDeclarationSupported

      public boolean isDynamicPropertyDeclarationSupported()
      Description copied from class: PropertyOwnerPointer
      Learn whether dynamic property declaration is supported.
      Overrides:
      isDynamicPropertyDeclarationSupported in class PropertyOwnerPointer
      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".
    • getBaseValue

      public Object getBaseValue()
      Returns the DP object iself.
      Specified by:
      getBaseValue in class NodePointer
      Returns:
      Object
    • isLeaf

      public boolean isLeaf()
      Description copied from class: NodePointer
      If true, this node does not have children
      Specified by:
      isLeaf in class NodePointer
      Returns:
      boolean
    • 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
      Returns:
      boolean
    • getLength

      public int getLength()
      Returns 1.
      Specified by:
      getLength in class NodePointer
      Returns:
      int
    • asPath

      public String asPath()
      Description copied from class: NodePointer
      Returns an XPath that maps to this Pointer.
      Specified by:
      asPath in interface Pointer
      Overrides:
      asPath in class NodePointer
      Returns:
      String xpath expression
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object