Class AbstractRootNode
java.lang.Object
com.puppycrawl.tools.checkstyle.xpath.AbstractNode
com.puppycrawl.tools.checkstyle.xpath.AbstractRootNode
- All Implemented Interfaces:
Source,SourceLocator,net.sf.saxon.lib.ActiveSource,net.sf.saxon.om.GroundedValue,net.sf.saxon.om.Item,net.sf.saxon.om.NodeInfo,net.sf.saxon.om.Sequence,net.sf.saxon.s9api.Location,Locator
- Direct Known Subclasses:
RootNode
Represents root node of Xpath-tree.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final AbstractNode[]Constant for optimization.private static final StringName of the root element. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newAbstractRootNodeinstance. -
Method Summary
Modifier and TypeMethodDescriptionintcompareOrder(net.sf.saxon.om.NodeInfo nodeInfo) Compares current object with specified for order.getAttributeValue(net.sf.saxon.om.NamespaceUri namespace, String localPart) Returns attribute value.intgetDepth()Getter method for node depth.Returns local part.intReturns type of the node.net.sf.saxon.om.NodeInfoReturns parent.net.sf.saxon.om.NodeInfogetRoot()Returns root of the tree.net.sf.saxon.tree.iter.AxisIteratoriterateAxis(int axisNumber) Determines axis iteration algorithm.private static UnsupportedOperationExceptionReturns UnsupportedOperationException exception.Methods inherited from class com.puppycrawl.tools.checkstyle.xpath.AbstractNode
atomize, copy, createChildren, generateId, getAllNamespaces, getBaseURI, getChildren, getConfiguration, getDeclaredNamespaces, getDisplayName, getFingerprint, getNamespaceUri, getPrefix, getPublicId, getSchemaType, getStringValue, getSystemId, getTokenType, getTreeInfo, getUnderlyingNode, getUnicodeStringValue, getURI, hasFingerprint, isId, isIdref, isNilled, isSameNodeInfo, isStreamed, iterateAxis, saveLocation, setSystemIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, materializeMethods inherited from interface net.sf.saxon.om.Item
getLength, head, itemAt, iterate, reduce, subsequenceMethods inherited from interface net.sf.saxon.om.NodeInfo
asActiveSource, attributes, children, children, deliver, equals, getAttributeValue, getColumnNumber, getGenre, getLineNumber, hasChildNodes, hashCode, toShortStringMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Field Details
-
ROOT_NAME
Name of the root element.- See Also:
-
EMPTY_ABSTRACT_NODE_ARRAY
Constant for optimization.
-
-
Constructor Details
-
AbstractRootNode
protected AbstractRootNode()Creates a newAbstractRootNodeinstance.
-
-
Method Details
-
compareOrder
Compares current object with specified for order. ThrowsUnsupportedOperationExceptionbecause functionality not required here.- Parameters:
nodeInfo- anotherNodeInfoobject- Returns:
- number representing order of current object to specified one
-
getAttributeValue
Returns attribute value. ThrowsUnsupportedOperationExceptionbecause root node has no attributes.- Parameters:
namespace- namespacelocalPart- actual name of the attribute- Returns:
- attribute value
-
getLocalPart
Returns local part.- Returns:
- local part
-
getNodeKind
Returns type of the node.- Returns:
- node kind
-
getParent
Returns parent.- Returns:
- parent
-
getRoot
Returns root of the tree.- Returns:
- root of the tree
-
iterateAxis
Determines axis iteration algorithm. ThrowsUnsupportedOperationExceptionin case, when there is no axis iterator for given axisNumber.- Parameters:
axisNumber- element fromAxisInfo- Returns:
AxisIteratorobject
-
getDepth
Getter method for node depth.- Specified by:
getDepthin classAbstractNode- Returns:
- always
0
-
throwUnsupportedOperationException
Returns UnsupportedOperationException exception.- Returns:
- UnsupportedOperationException exception
-