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:
net.sourceforge.pmd.lang.ast.impl.GenericNode<EcmascriptNode<?>>,net.sourceforge.pmd.lang.ast.Node,DestructuringNode,EcmascriptNode<org.mozilla.javascript.ast.VariableInitializer>,net.sourceforge.pmd.reporting.Reportable
public final class ASTVariableInitializer
extends net.sourceforge.pmd.lang.ast.impl.AbstractNode<net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?>,EcmascriptNode<?>>
implements DestructuringNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.mozilla.javascript.ast.VariableInitializerFields inherited from interface net.sourceforge.pmd.lang.ast.Node
COORDS_COMPARATOR -
Method Summary
Modifier and TypeMethodDescriptionprotected <P,R> R acceptJsVisitor(EcmascriptVisitor<? super P, ? extends R> visitor, P data) final <P,R> R acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor<? super P, ? extends R> visitor, P data) protected voidaddChild(net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?> child, int index) getJsDoc()Get the JsDoc associated with the given node.net.sourceforge.pmd.lang.document.TextRegionbooleanbooleanprotected 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sourceforge.pmd.lang.ast.impl.GenericNode
ancestors, ancestorsOrSelf, asStream, children, descendants, descendantsOrSelf, getChild, getFirstChild, getLastChild, getNextSibling, getParent, getPreviousSiblingMethods inherited from interface net.sourceforge.pmd.lang.ast.Node
ancestors, children, compareLocation, descendants, firstChild, getAstInfo, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getImage, getIndexInParent, getLanguageVersion, getNumChildren, getReportLocation, getRoot, getTextDocument, getUserMap, getXPathAttributesIterator, hasImageEqualTo, isFindBoundary
-
Field Details
-
node
protected final org.mozilla.javascript.ast.VariableInitializer node
-
-
Method Details
-
acceptJsVisitor
-
getTarget
-
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 classnet.sourceforge.pmd.lang.ast.impl.AbstractNode<net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?>,EcmascriptNode<?>>
-
getTextRegion
public net.sourceforge.pmd.lang.document.TextRegion getTextRegion()- Specified by:
getTextRegionin interfacenet.sourceforge.pmd.lang.ast.Node
-
acceptVisitor
public final <P,R> R acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor<? super P, ? extends R> visitor, P data) - Specified by:
acceptVisitorin interfacenet.sourceforge.pmd.lang.ast.Node
-
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
- Specified by:
getXPathNodeNamein interfacenet.sourceforge.pmd.lang.ast.Node
-
setTrailingCommaExists
protected void setTrailingCommaExists(boolean b)
-