Class XMLBeanDeclaration.NodeData<T>

java.lang.Object
org.apache.commons.configuration2.beanutils.XMLBeanDeclaration.NodeData<T>
Type Parameters:
T - the type of the node
Enclosing class:
XMLBeanDeclaration

static class XMLBeanDeclaration.NodeData<T> extends Object
An internal helper class which wraps the node with the bean declaration and the corresponding node handler.
  • Field Details

    • node

      private final T node
      The wrapped node.
    • nodeHandler

      private final NodeHandler<T> nodeHandler
      The node handler for interacting with this node.
  • Constructor Details

    • NodeData

      NodeData(T node, NodeHandler<T> nodeHandler)
      Constructs a new instance of NodeData.
      Parameters:
      node - the node
      nodeHandler - the node handler
  • Method Details

    • nodeName

      String nodeName()
      Returns the name of the wrapped node.
      Returns:
      the node name
    • escapedNodeName

      String escapedNodeName(HierarchicalConfiguration<?> config)
      Returns the unescaped name of the node stored in this data object. This method handles the case that the node name may contain reserved characters with a special meaning for the current expression engine. In this case, the characters affected have to be escaped accordingly.
      Parameters:
      config - the configuration
      Returns:
      the escaped node name
    • getChildren

      Gets a list with the children of the wrapped node, again wrapped into NodeData objects.
      Returns:
      a list with the children
    • getChildren

      Gets a list with the children of the wrapped node with the given name, again wrapped into NodeData objects.
      Parameters:
      name - the name of the desired child nodes
      Returns:
      a list with the children with this name
    • getAttributes

      Set<String> getAttributes()
      Gets a set with the names of the attributes of the wrapped node.
      Returns:
      the attribute names of this node
    • getAttribute

      Object getAttribute(String key)
      Gets the value of the attribute with the given name of the wrapped node.
      Parameters:
      key - the key of the attribute
      Returns:
      the value of this attribute
    • matchesConfigRootNode

      boolean matchesConfigRootNode(HierarchicalConfiguration<?> config)
      Returns a flag whether the wrapped node is the root node of the passed in configuration.
      Parameters:
      config - the configuration
      Returns:
      a flag whether this node is the configuration's root node
    • wrapInNodeData

      List<XMLBeanDeclaration.NodeData<T>> wrapInNodeData(List<T> nodes)
      Wraps the passed in list of nodes in NodeData objects.
      Parameters:
      nodes - the list with nodes
      Returns:
      the wrapped nodes