Class ConfigurationNodeIteratorAttribute<T>

  • Type Parameters:
    T - the type of the nodes this iterator deals with
    All Implemented Interfaces:
    org.apache.commons.jxpath.ri.model.NodeIterator

    final class ConfigurationNodeIteratorAttribute<T>
    extends AbstractConfigurationNodeIterator<T>
    A specialized node iterator implementation that deals with attribute nodes.
    • Field Detail

      • WILDCARD

        private static final java.lang.String WILDCARD
        Constant for the wildcard node name.
        See Also:
        Constant Field Values
      • attributeNames

        private final java.util.List<java.lang.String> attributeNames
        A list with the names of the managed attributes.
    • Constructor Detail

      • ConfigurationNodeIteratorAttribute

        public ConfigurationNodeIteratorAttribute​(ConfigurationNodePointer<T> parent,
                                                  org.apache.commons.jxpath.ri.QName name)
        Creates a new instance of ConfigurationNodeIteratorAttribute.
        Parameters:
        parent - the parent node pointer
        name - the name of the selected attribute
    • Method Detail

      • addAttributeData

        private void addAttributeData​(ConfigurationNodePointer<T> parent,
                                      java.util.List<java.lang.String> result,
                                      java.lang.String name)
        Helper method for checking whether an attribute is defined and adding it to the list of attributes to iterate over.
        Parameters:
        parent - the parent node pointer
        result - the result list
        name - the name of the current attribute
      • createAttributeDataList

        private java.util.List<java.lang.String> createAttributeDataList​(ConfigurationNodePointer<T> parent,
                                                                         org.apache.commons.jxpath.ri.QName name)
        Determines which attributes are selected based on the passed in node name.
        Parameters:
        parent - the parent node pointer
        name - the name of the selected attribute
        Returns:
        a list with the selected attributes
      • createNodePointer

        protected org.apache.commons.jxpath.ri.model.NodePointer createNodePointer​(int position)
        Creates a pointer for the node at the specified position.
        Specified by:
        createNodePointer in class AbstractConfigurationNodeIterator<T>
        Parameters:
        position - the desired position
        Returns:
        a pointer for the attribute at this position