Class ElementNode
java.lang.Object
com.puppycrawl.tools.checkstyle.xpath.AbstractNode
com.puppycrawl.tools.checkstyle.xpath.ElementNode
- All Implemented Interfaces:
Iterable<net.sf.saxon.om.NodeInfo>
,Source
,SourceLocator
,net.sf.saxon.expr.parser.Location
,net.sf.saxon.om.GroundedValue<net.sf.saxon.om.NodeInfo>
,net.sf.saxon.om.Item<net.sf.saxon.om.NodeInfo>
,net.sf.saxon.om.NodeInfo
,net.sf.saxon.om.Sequence<net.sf.saxon.om.NodeInfo>
,Locator
Represents element node of Xpath-tree.
-
Field Summary
Fields inherited from interface net.sf.saxon.om.NodeInfo
IS_DTD_TYPE, IS_NILLED
-
Constructor Summary
ConstructorsConstructorDescriptionElementNode
(AbstractNode root, AbstractNode parent, DetailAST detailAst) Creates a newElementNode
instance. -
Method Summary
Modifier and TypeMethodDescriptionint
compareOrder
(net.sf.saxon.om.NodeInfo other) Compares current object with specified for order.getAttributeValue
(String namespace, String localPart) Returns attribute value.int
Returns column number.int
Returns line number.Returns local part.int
Returns type of the node.net.sf.saxon.om.NodeInfo
Returns parent.net.sf.saxon.om.NodeInfo
getRoot()
Returns root.int
Getter method for token type.Returns underlying node.net.sf.saxon.tree.iter.AxisIterator
iterateAxis
(byte axisNumber) Determines axis iteration algorithm.Methods inherited from class com.puppycrawl.tools.checkstyle.xpath.AbstractNode
addChild, atomize, copy, generateId, getBaseURI, getChildren, getConfiguration, getDeclaredNamespaces, getDepth, getDisplayName, getFingerprint, getPrefix, getPublicId, getSchemaType, getStringValue, getStringValueCS, getSystemId, getTreeInfo, getURI, hasChildNodes, hasFingerprint, isId, isIdref, isNilled, isSameNodeInfo, isStreamed, iterateAxis, saveLocation, setDepth, setSystemId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, effectiveBooleanValue, materialize
Methods inherited from interface net.sf.saxon.om.Item
getLength, head, itemAt, iterate, iterator, reduce, subsequence
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface net.sf.saxon.om.NodeInfo
equals, getGenre, hashCode, toShortString
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
ElementNode
Creates a newElementNode
instance.- Parameters:
root
-Node
root of the treeparent
-Node
parent of the current nodedetailAst
- reference toDetailAST
-
-
Method Details
-
compareOrder
public int compareOrder(net.sf.saxon.om.NodeInfo other) Compares current object with specified for order.- Parameters:
other
- anotherNodeInfo
object- Returns:
- number representing order of current object to specified one
-
getAttributeValue
Returns attribute value. ThrowsUnsupportedOperationException
in case, when name of the attribute is not equal to 'text'.- Parameters:
namespace
- namespacelocalPart
- actual name of the attribute- Returns:
- attribute value
-
getLocalPart
Returns local part.- Returns:
- local part
-
getNodeKind
public int getNodeKind()Returns type of the node.- Returns:
- node kind
-
getParent
public net.sf.saxon.om.NodeInfo getParent()Returns parent.- Returns:
- parent
-
getRoot
public net.sf.saxon.om.NodeInfo getRoot()Returns root.- Returns:
- root
-
iterateAxis
public net.sf.saxon.tree.iter.AxisIterator iterateAxis(byte axisNumber) Determines axis iteration algorithm. ThrowsUnsupportedOperationException
in case, when there is no axis iterator for given axisNumber.- Parameters:
axisNumber
- element fromAxisInfo
- Returns:
AxisIterator
object
-
getLineNumber
public int getLineNumber()Returns line number.- Returns:
- line number
-
getColumnNumber
public int getColumnNumber()Returns column number.- Returns:
- column number
-
getTokenType
public int getTokenType()Getter method for token type.- Specified by:
getTokenType
in classAbstractNode
- Returns:
- token type
-
getUnderlyingNode
Returns underlying node.- Specified by:
getUnderlyingNode
in classAbstractNode
- Returns:
- underlying node
-