Package org.sonar.python.tree
Class PyIfStatementTreeImpl
- java.lang.Object
-
- org.sonar.python.tree.PyTree
-
- org.sonar.python.tree.PyIfStatementTreeImpl
-
- All Implemented Interfaces:
PyIfStatementTree,PyStatementTree,Tree
public class PyIfStatementTreeImpl extends PyTree implements PyIfStatementTree
-
-
Constructor Summary
Constructors Constructor Description PyIfStatementTreeImpl(com.sonar.sslr.api.Token elifKeyword, PyExpressionTree condition, PyStatementListTree statements)Elif statement constructorPyIfStatementTreeImpl(com.sonar.sslr.api.Token ifKeyword, PyExpressionTree condition, PyStatementListTree statements, List<PyIfStatementTree> elifBranches, PyElseStatementTree elseStatement)If statement constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(PyTreeVisitor visitor)PyStatementListTreebody()List<Tree>children()PyExpressionTreecondition()List<PyIfStatementTree>elifBranches()PyElseStatementTreeelseBranch()Tree.KindgetKind()booleanisElif()com.sonar.sslr.api.Tokenkeyword()-
Methods inherited from class org.sonar.python.tree.PyTree
astNode, firstToken, is, lastToken, parent, setParent
-
-
-
-
Constructor Detail
-
PyIfStatementTreeImpl
public PyIfStatementTreeImpl(com.sonar.sslr.api.Token ifKeyword, PyExpressionTree condition, PyStatementListTree statements, List<PyIfStatementTree> elifBranches, @CheckForNull PyElseStatementTree elseStatement)If statement constructor
-
PyIfStatementTreeImpl
public PyIfStatementTreeImpl(com.sonar.sslr.api.Token elifKeyword, PyExpressionTree condition, PyStatementListTree statements)Elif statement constructor
-
-
Method Detail
-
keyword
public com.sonar.sslr.api.Token keyword()
- Specified by:
keywordin interfacePyIfStatementTree
-
condition
public PyExpressionTree condition()
- Specified by:
conditionin interfacePyIfStatementTree
-
body
public PyStatementListTree body()
- Specified by:
bodyin interfacePyIfStatementTree
-
elifBranches
public List<PyIfStatementTree> elifBranches()
- Specified by:
elifBranchesin interfacePyIfStatementTree
-
isElif
public boolean isElif()
- Specified by:
isElifin interfacePyIfStatementTree
-
elseBranch
@CheckForNull public PyElseStatementTree elseBranch()
- Specified by:
elseBranchin interfacePyIfStatementTree
-
accept
public void accept(PyTreeVisitor visitor)
-
-