net.sourceforge.pmd.lang.ecmascript.ast
Class AbstractEcmascriptNode<T extends org.mozilla.javascript.ast.AstNode>

java.lang.Object
  extended by net.sourceforge.pmd.lang.ast.AbstractNode
      extended by net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<T>
All Implemented Interfaces:
Node, EcmascriptNode
Direct Known Subclasses:
AbstractInfixEcmascriptNode, ASTArrayComprehension, ASTArrayComprehensionLoop, ASTArrayLiteral, ASTAstRoot, ASTBlock, ASTBreakStatement, ASTCatchClause, ASTComment, ASTConditionalExpression, ASTContinueStatement, ASTDoLoop, ASTElementGet, ASTEmptyExpression, 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 AbstractNode
implements EcmascriptNode


Field Summary
protected  T node
           
 
Fields inherited from class net.sourceforge.pmd.lang.ast.AbstractNode
beginColumn, beginLine, children, endColumn, endLine, id, parent
 
Constructor Summary
AbstractEcmascriptNode(T node)
           
 
Method Summary
 Object childrenAccept(EcmascriptParserVisitor visitor, Object data)
          Accept the visitor
 int getBeginColumn()
           
 String getJsDoc()
          Get the JsDoc associated with the given node.
 T getNode()
          Get the underlying Rhino AST node.
 boolean hasSideEffects()
           
 Object jjtAccept(EcmascriptParserVisitor visitor, Object data)
          Accept the visitor
 String toString()
          Subclasses should implement this method to return a name usable with XPathRule for evaluating Element Names.
 
Methods inherited from class net.sourceforge.pmd.lang.ast.AbstractNode
appendElement, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, hasDecendantOfAnyType, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, isSingleLine, jjtAddChild, jjtClose, jjtGetChild, jjtGetId, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, setDataFlowNode, setImage, setUserData, testingOnly__setBeginColumn, testingOnly__setBeginLine, testingOnly__setEndColumn, testingOnly__setEndLine
 
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, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, jjtAddChild, jjtClose, jjtGetChild, jjtGetId, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, 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 Object jjtAccept(EcmascriptParserVisitor visitor,
                        Object data)
Accept the visitor. *

Specified by:
jjtAccept in interface EcmascriptNode

childrenAccept

public Object childrenAccept(EcmascriptParserVisitor visitor,
                             Object data)
Accept the visitor. *

Specified by:
childrenAccept in interface EcmascriptNode

getNode

public T getNode()
Description copied from interface: EcmascriptNode
Get the underlying Rhino AST node.

Specified by:
getNode in interface EcmascriptNode

getJsDoc

public String getJsDoc()
Description copied from interface: EcmascriptNode
Get 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:
getJsDoc in interface EcmascriptNode
Returns:
The JsDoc comment for the node, may be null.

hasSideEffects

public boolean hasSideEffects()
Specified by:
hasSideEffects in interface EcmascriptNode

getBeginColumn

public int getBeginColumn()
Specified by:
getBeginColumn in interface Node
Overrides:
getBeginColumn in class AbstractNode

toString

public String toString()
Description copied from class: AbstractNode
Subclasses should implement this method to return a name usable with XPathRule for evaluating Element Names.

Specified by:
toString in class AbstractNode


Copyright © 2002-2012 InfoEther. All Rights Reserved.