public class Statement extends BaseNode implements Statements
Node
that represents a single Java statement.Constructor and Description |
---|
Statement(Expression expression)
Creates a new
Statement from an Expression . |
Statement(String code)
|
Modifier and Type | Method and Description |
---|---|
List<Statements> |
getStatements()
|
String |
toCode()
The Java code representation of this
Node . |
public Statement(String code)
Statement
from a String
of code
representing an Expression
. Automatically appends a semicolon to
code
.code
- A textual Expression
. Should not end with a semicolon.public Statement(Expression expression)
Statement
from an Expression
.expression
- A non null
Expression
.public List<Statements> getStatements()
getStatements
in interface Statements
null
list of Statements
.Copyright © 2018. All rights reserved.