Class JStmtBlock
java.lang.Object
com.inductiveautomation.snap.javatree.JNode
com.inductiveautomation.snap.javatree.JStmt
com.inductiveautomation.snap.javatree.JStmtBlock
A Java statement for a block of statements.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStatement
(JStmt aStmt, int anIndex) Adds a statement.getBlock()
Returns the statement block.Returns the list of statements.getVariableDeclInside
(String aName) Returns a variable with given name.getVariableDecls
(String aPrefix, List<JVariableDecl> theVariables) Returns a variable with given name.boolean
isBlock()
Returns whether statement has a block associated with it.removeStatement
(int anIndex) Removes a statement.int
removeStatement
(JStmt aStmt) Removes a statement.Methods inherited from class com.inductiveautomation.snap.javatree.JNode
addChild, buildChildren, getChild, getChildCount, getChildren, getClassLoader, getClassName, getClassNameImpl, getClassRef, getClassRefImpl, getEnclosingClassDecl, getEnclosingMemberDecl, getEnclosingMethodDecl, getEnd, getEndToken, getFile, getJClass, getLineIndex, getName, getNameImpl, getNodeAtCharIndex, getNodeFields, getNodeFieldsImpl, getNodeParents, getNodePath, getNodeString, getOthers, getParent, getParent, getReferencedClasses, getReferencedClassNames, getReferencedClassNames, getReferencedClassNames, getStart, getStartToken, getString, getVariableDecl, setClassName, setClassRef, setEndToken, setJClass, setParent, setStartToken, toString
-
Field Details
-
statements
-
-
Constructor Details
-
JStmtBlock
public JStmtBlock()
-
-
Method Details
-
getStatements
Returns the list of statements. -
isBlock
public boolean isBlock()Returns whether statement has a block associated with it. -
getBlock
Returns the statement block. -
addStatement
Adds a statement. -
removeStatement
Removes a statement. -
removeStatement
Removes a statement. -
getVariableDeclInside
Returns a variable with given name.- Overrides:
getVariableDeclInside
in classJNode
-
getVariableDecls
Returns a variable with given name.- Overrides:
getVariableDecls
in classJNode
-