Class AbstractEcmascriptNode<T extends org.mozilla.javascript.ast.AstNode>
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.AbstractNode
-
- net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<T>
-
- All Implemented Interfaces:
net.sourceforge.pmd.lang.ast.Node,EcmascriptNode<T>
- Direct Known Subclasses:
AbstractInfixEcmascriptNode,ASTArrayComprehension,ASTArrayComprehensionLoop,ASTArrayLiteral,ASTAstRoot,ASTBlock,ASTBreakStatement,ASTCatchClause,ASTComment,ASTConditionalExpression,ASTContinueStatement,ASTDoLoop,ASTElementGet,ASTEmptyExpression,ASTEmptyStatement,ASTExpressionStatement,ASTForInLoop,ASTForLoop,ASTFunctionCall,ASTFunctionNode,ASTIfStatement,ASTKeywordLiteral,ASTLabel,ASTLabeledStatement,ASTLetNode,ASTName,ASTNewExpression,ASTNumberLiteral,ASTObjectLiteral,ASTParenthesizedExpression,ASTRegExpLiteral,ASTReturnStatement,ASTScope,ASTStringLiteral,ASTSwitchCase,ASTSwitchStatement,ASTThrowStatement,ASTTryStatement,ASTUnaryExpression,ASTVariableDeclaration,ASTVariableInitializer,ASTWhileLoop,ASTWithStatement,ASTXmlExpression,ASTXmlString
public abstract class AbstractEcmascriptNode<T extends org.mozilla.javascript.ast.AstNode> extends net.sourceforge.pmd.lang.ast.AbstractNode implements EcmascriptNode<T>
-
-
Constructor Summary
Constructors Constructor Description AbstractEcmascriptNode(T node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectchildrenAccept(EcmascriptParserVisitor visitor, java.lang.Object data)Accept the visitorjava.lang.StringgetJsDoc()Get the JsDoc associated with the given node.TgetNode()Get the underlying Rhino AST node.java.lang.StringgetXPathNodeName()booleanhasSideEffects()java.lang.ObjectjjtAccept(EcmascriptParserVisitor visitor, java.lang.Object data)Accept the visitor-
Methods inherited from class net.sourceforge.pmd.lang.ast.AbstractNode
appendElement, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, getXPathAttributesIterator, hasDecendantOfAnyType, hasDescendantMatchingXPath, hasDescendantOfAnyType, hasDescendantOfType, hasImageEqualTo, isFindBoundary, isSingleLine, jjtAddChild, jjtClose, jjtGetChild, jjtGetChildIndex, jjtGetFirstToken, jjtGetId, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetChildIndex, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData, testingOnlySetBeginColumn, testingOnlySetBeginLine, testingOnlySetEndColumn, testingOnlySetEndLine, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.Node
findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, getXPathAttributesIterator, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, jjtAddChild, jjtClose, jjtGetChild, jjtGetChildIndex, jjtGetId, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetChildIndex, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData
-
-
-
-
Field Detail
-
node
protected final T extends org.mozilla.javascript.ast.AstNode node
-
-
Constructor Detail
-
AbstractEcmascriptNode
public AbstractEcmascriptNode(T node)
-
-
Method Detail
-
jjtAccept
public java.lang.Object jjtAccept(EcmascriptParserVisitor visitor, java.lang.Object data)
Accept the visitor. *- Specified by:
jjtAcceptin interfaceEcmascriptNode<T extends org.mozilla.javascript.ast.AstNode>
-
childrenAccept
public java.lang.Object childrenAccept(EcmascriptParserVisitor visitor, java.lang.Object data)
Accept the visitor. *- Specified by:
childrenAcceptin interfaceEcmascriptNode<T extends org.mozilla.javascript.ast.AstNode>
-
getNode
public T getNode()
Description copied from interface:EcmascriptNodeGet the underlying Rhino AST node.- Specified by:
getNodein interfaceEcmascriptNode<T extends org.mozilla.javascript.ast.AstNode>
-
getJsDoc
public java.lang.String getJsDoc()
Description copied from interface:EcmascriptNodeGet the JsDoc associated with the given node. If there is no JsDoc on this node, it may be associated with a parent node, on more representative of the entire expression containing this node.- Specified by:
getJsDocin interfaceEcmascriptNode<T extends org.mozilla.javascript.ast.AstNode>- Returns:
- The JsDoc comment for the node, may be
null.
-
hasSideEffects
public boolean hasSideEffects()
- Specified by:
hasSideEffectsin interfaceEcmascriptNode<T extends org.mozilla.javascript.ast.AstNode>
-
getXPathNodeName
public java.lang.String getXPathNodeName()
- Specified by:
getXPathNodeNamein interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getXPathNodeNamein classnet.sourceforge.pmd.lang.ast.AbstractNode
-
-