Class ASTVariableInitializer
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.impl.AbstractNode<net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?>,EcmascriptNode<?>>
-
- net.sourceforge.pmd.lang.ecmascript.ast.ASTVariableInitializer
-
- All Implemented Interfaces:
GenericNode<EcmascriptNode<?>>,Node,DestructuringNode,EcmascriptNode<org.mozilla.javascript.ast.VariableInitializer>,Reportable
public final class ASTVariableInitializer extends AbstractNode<net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?>,EcmascriptNode<?>> implements DestructuringNode
-
-
Field Summary
Fields Modifier and Type Field Description protected Tnode-
Fields inherited from interface net.sourceforge.pmd.lang.ast.Node
COORDS_COMPARATOR
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected <P,R>
RacceptJsVisitor(EcmascriptVisitor<? super P,? extends R> visitor, P data)<P,R>
RacceptVisitor(AstVisitor<? super P,? extends R> visitor, P data)protected voidaddChild(net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?> child, int index)StringgetImage()EcmascriptNode<?>getInitializer()StringgetJsDoc()Get the JsDoc associated with the given node.TgetNode()Deprecated.EcmascriptNode<?>getTarget()TextRegiongetTextRegion()StringgetXPathNodeName()booleanhasSideEffects()booleanisDestructuring()protected voidsetImage(String image)protected voidsetTrailingCommaExists(boolean b)-
Methods inherited from class net.sourceforge.pmd.lang.ast.impl.AbstractNode
children, firstChild, getChild, getIndexInParent, getNumChildren, getParent, getUserMap, insertChild, remove, removeChildAtIndex, setChild, setParent, 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.ecmascript.ast.EcmascriptNode
jjtAccept
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.impl.GenericNode
ancestors, ancestorsOrSelf, asStream, children, descendants, descendantsOrSelf, getChild, getFirstChild, getLastChild, getNextSibling, getNthParent, getParent, getPreviousSibling
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.Node
ancestors, children, compareLocation, descendants, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, firstChild, getAstInfo, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfType, getIndexInParent, getLanguageVersion, getNumChildren, getParentsOfType, getReportLocation, getRoot, getTextDocument, getUserMap, getXPathAttributesIterator, hasDescendantOfType, hasImageEqualTo, isFindBoundary
-
-
-
-
Method Detail
-
acceptJsVisitor
protected <P,R> R acceptJsVisitor(EcmascriptVisitor<? super P,? extends R> visitor, P data)
-
getTarget
public EcmascriptNode<?> getTarget()
-
getInitializer
public EcmascriptNode<?> getInitializer()
-
isDestructuring
public boolean isDestructuring()
- Specified by:
isDestructuringin interfaceDestructuringNode
-
addChild
protected void addChild(net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?> child, int index)- Overrides:
addChildin classAbstractNode<net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?>,EcmascriptNode<?>>
-
setImage
protected void setImage(String image)
-
getTextRegion
public TextRegion getTextRegion()
- Specified by:
getTextRegionin interfaceNode
-
acceptVisitor
public final <P,R> R acceptVisitor(AstVisitor<? super P,? extends R> visitor, P data)
- Specified by:
acceptVisitorin interfaceNode
-
getNode
@Deprecated public T getNode()
Deprecated.Description copied from interface:EcmascriptNodeGet the underlying Rhino AST node.- Specified by:
getNodein interfaceEcmascriptNode<T extends org.mozilla.javascript.ast.AstNode>
-
getJsDoc
public 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 String getXPathNodeName()
- Specified by:
getXPathNodeNamein interfaceNode
-
setTrailingCommaExists
protected void setTrailingCommaExists(boolean b)
-
-