Class AttributeNode
java.lang.Object
com.puppycrawl.tools.checkstyle.xpath.AbstractNode
com.puppycrawl.tools.checkstyle.xpath.AttributeNode
- 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 attribute of the element.
-
Field Summary
Fields inherited from interface net.sf.saxon.om.NodeInfo
IS_DTD_TYPE, IS_NILLED -
Constructor Summary
ConstructorsConstructorDescriptionAttributeNode(String name, String value) Creates a newAttributeNodeinstance. -
Method Summary
Modifier and TypeMethodDescriptionintcompareOrder(net.sf.saxon.om.NodeInfo nodeInfo) Compares current object with specified for order.getAttributeValue(String namespace, String localPart) Returns attribute value.intReturns column number.intReturns line number.Returns local part.intReturns type of the node.net.sf.saxon.om.NodeInfoReturns parent.net.sf.saxon.om.NodeInfogetRoot()Returns root.Returns string value.intGetter method for token type.Returns underlying node.net.sf.saxon.tree.iter.AxisIteratoriterateAxis(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, getStringValueCS, getSystemId, getTreeInfo, getURI, hasChildNodes, hasFingerprint, isId, isIdref, isNilled, isSameNodeInfo, isStreamed, iterateAxis, saveLocation, setDepth, 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, effectiveBooleanValue, materializeMethods inherited from interface net.sf.saxon.om.Item
getLength, head, itemAt, iterate, iterator, reduce, subsequenceMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.sf.saxon.om.NodeInfo
equals, getGenre, hashCode, toShortStringMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
AttributeNode
Creates a newAttributeNodeinstance.- Parameters:
name- name of the attributevalue- value of the attribute
-
-
Method Details
-
compareOrder
public int compareOrder(net.sf.saxon.om.NodeInfo nodeInfo) 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 attribute node has no attributes.- 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. Never called for attribute node, throwsUnsupportedOperationException. has no attributes.- Returns:
- parent
-
getRoot
public net.sf.saxon.om.NodeInfo getRoot()Returns root. Never called for attribute node, throwsUnsupportedOperationException.- Returns:
- root
-
getStringValue
Returns string value.- Specified by:
getStringValuein interfacenet.sf.saxon.om.GroundedValue<net.sf.saxon.om.NodeInfo>- Specified by:
getStringValuein interfacenet.sf.saxon.om.Item<net.sf.saxon.om.NodeInfo>- Specified by:
getStringValuein interfacenet.sf.saxon.om.NodeInfo- Overrides:
getStringValuein classAbstractNode- Returns:
- string value
-
iterateAxis
public net.sf.saxon.tree.iter.AxisIterator iterateAxis(byte axisNumber) Determines axis iteration algorithm. Attribute node can not be iterated, throwsUnsupportedOperationException.- Parameters:
axisNumber- element fromAxisInfo- Returns:
AxisIteratorobject
-
getLineNumber
public int getLineNumber()Returns line number. Attribute node has no line number, throwsUnsupportedOperationException.- Returns:
- line number
-
getColumnNumber
public int getColumnNumber()Returns column number. Attribute node has no column number, throwsUnsupportedOperationException.- Returns:
- column number
-
getTokenType
public int getTokenType()Getter method for token type. Attribute node has no token type, throwsUnsupportedOperationException.- Specified by:
getTokenTypein classAbstractNode- Returns:
- token type
-
getUnderlyingNode
Returns underlying node. Attribute node has no underlying node, throwsUnsupportedOperationException.- Specified by:
getUnderlyingNodein classAbstractNode- Returns:
- underlying node
-