Package org.sonar.python.tree
Class WhileStatementImpl
- java.lang.Object
-
- org.sonar.python.tree.PyTree
-
- org.sonar.python.tree.WhileStatementImpl
-
- All Implemented Interfaces:
Statement,Tree,WhileStatement
public class WhileStatementImpl extends PyTree implements WhileStatement
-
-
Field Summary
-
Fields inherited from class org.sonar.python.tree.PyTree
firstToken, lastToken
-
-
Constructor Summary
Constructors Constructor Description WhileStatementImpl(Token whileKeyword, Expression condition, Token colon, Token firstNewline, Token firstIndent, StatementList body, Token firstDedent, ElseClause elseClause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(TreeVisitor visitor)StatementListbody()Tokencolon()List<Tree>computeChildren()Expressioncondition()ElseClauseelseClause()Tree.KindgetKind()TokenwhileKeyword()-
Methods inherited from class org.sonar.python.tree.PyTree
children, firstToken, is, lastToken, parent, setParent
-
-
-
-
Constructor Detail
-
WhileStatementImpl
public WhileStatementImpl(Token whileKeyword, Expression condition, Token colon, @Nullable Token firstNewline, @Nullable Token firstIndent, StatementList body, @Nullable Token firstDedent, @Nullable ElseClause elseClause)
-
-
Method Detail
-
accept
public void accept(TreeVisitor visitor)
-
whileKeyword
public Token whileKeyword()
- Specified by:
whileKeywordin interfaceWhileStatement
-
condition
public Expression condition()
- Specified by:
conditionin interfaceWhileStatement
-
colon
public Token colon()
- Specified by:
colonin interfaceWhileStatement
-
body
public StatementList body()
- Specified by:
bodyin interfaceWhileStatement
-
elseClause
@CheckForNull public ElseClause elseClause()
- Specified by:
elseClausein interfaceWhileStatement
-
-