Class VariableDeclarationStatement
- java.lang.Object
-
- com.strobel.core.Freezable
-
- com.strobel.decompiler.languages.java.ast.AstNode
-
- com.strobel.decompiler.languages.java.ast.Statement
-
- com.strobel.decompiler.languages.java.ast.VariableDeclarationStatement
-
- All Implemented Interfaces:
UserDataStore
,IFreezable
,INode
,java.lang.Cloneable
public class VariableDeclarationStatement extends Statement
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
_anyModifiers
static Role<JavaModifierToken>
MODIFIER_ROLE
-
Fields inherited from class com.strobel.decompiler.languages.java.ast.AstNode
AST_NODE_USED_FLAGS, flags, FROZEN_BIT, ROLE_INDEX_MASK, ROOT_ROLE
-
Fields inherited from interface com.strobel.decompiler.patterns.INode
CHILD_ITERATOR
-
-
Constructor Summary
Constructors Constructor Description VariableDeclarationStatement()
VariableDeclarationStatement(AstType type, java.lang.String name)
VariableDeclarationStatement(AstType type, java.lang.String name, int offset)
VariableDeclarationStatement(AstType type, java.lang.String name, int offset, Expression initializer)
VariableDeclarationStatement(AstType type, java.lang.String name, Expression initializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,R>
RacceptVisitor(IAstVisitor<? super T,? extends R> visitor, T data)
void
addModifier(Flags.Flag modifier)
java.util.List<Flags.Flag>
getModifiers()
JavaTokenNode
getSemicolonToken()
AstType
getType()
VariableInitializer
getVariable(java.lang.String name)
AstNodeCollection<VariableInitializer>
getVariables()
boolean
isAnyModifiers()
Gets the "any" modifiers flag used during pattern matching.boolean
matches(INode other, Match match)
void
removeModifier(Flags.Flag modifier)
void
setAnyModifiers(boolean value)
Sets the "any" modifiers flag used during pattern matching.void
setModifiers(java.util.List<Flags.Flag> modifiers)
void
setType(AstType value)
-
Methods inherited from class com.strobel.decompiler.languages.java.ast.Statement
clone, forPattern, getNextStatement, getNodeType, getOffset, getPreviousStatement, getRole, isEmbeddable
-
Methods inherited from class com.strobel.decompiler.languages.java.ast.AstNode
addChild, addChildUnsafe, contains, contains, copyUserDataFrom, debugToString, freezeCore, getAncestors, getAncestors, getAncestorsAndSelf, getChildByRole, getChildren, getChildrenByRole, getDescendants, getDescendantsAndSelf, getEndLocation, getFirstChild, getLastChild, getNextNode, getNextSibling, getNextSibling, getParent, getParent, getPreviousNode, getPreviousSibling, getPreviousSibling, getRegion, getStartLocation, getText, getText, getUserData, hasChildren, insertChildAfter, insertChildBefore, insertChildBeforeUnsafe, insertChildrenAfter, insertChildrenBefore, isAncestorOf, isAncestorOf, isDescendantOf, isInside, isInside, isLoop, isNull, isReference, isUnconditionalBranch, makeOptional, match, matches, matchesCollection, matchString, putUserData, putUserDataIfAbsent, remove, replace, replaceWith, replaceWith, setChildByRole, setRole, setRoleUnsafe, toString, withName
-
Methods inherited from class com.strobel.core.Freezable
canFreeze, freeze, freezeIfUnfrozen, isFrozen, tryFreeze, verifyFrozen, verifyNotFrozen
-
-
-
-
Field Detail
-
MODIFIER_ROLE
public static final Role<JavaModifierToken> MODIFIER_ROLE
-
_anyModifiers
private boolean _anyModifiers
-
-
Constructor Detail
-
VariableDeclarationStatement
public VariableDeclarationStatement()
-
VariableDeclarationStatement
public VariableDeclarationStatement(AstType type, java.lang.String name)
-
VariableDeclarationStatement
public VariableDeclarationStatement(AstType type, java.lang.String name, int offset)
-
VariableDeclarationStatement
public VariableDeclarationStatement(AstType type, java.lang.String name, Expression initializer)
-
VariableDeclarationStatement
public VariableDeclarationStatement(AstType type, java.lang.String name, int offset, Expression initializer)
-
-
Method Detail
-
isAnyModifiers
public final boolean isAnyModifiers()
Gets the "any" modifiers flag used during pattern matching.
-
setAnyModifiers
public final void setAnyModifiers(boolean value)
Sets the "any" modifiers flag used during pattern matching.
-
getModifiers
public final java.util.List<Flags.Flag> getModifiers()
-
addModifier
public final void addModifier(Flags.Flag modifier)
-
removeModifier
public final void removeModifier(Flags.Flag modifier)
-
setModifiers
public final void setModifiers(java.util.List<Flags.Flag> modifiers)
-
getType
public final AstType getType()
-
setType
public final void setType(AstType value)
-
getSemicolonToken
public final JavaTokenNode getSemicolonToken()
-
getVariables
public final AstNodeCollection<VariableInitializer> getVariables()
-
getVariable
public final VariableInitializer getVariable(java.lang.String name)
-
acceptVisitor
public <T,R> R acceptVisitor(IAstVisitor<? super T,? extends R> visitor, T data)
- Specified by:
acceptVisitor
in classAstNode
-
-