Package | Description |
---|---|
com.github.javaparser | |
com.github.javaparser.ast.expr | |
com.github.javaparser.ast.nodeTypes | |
com.github.javaparser.ast.stmt | |
com.github.javaparser.generator.metamodel |
Modifier and Type | Field and Description |
---|---|
static ParseStart<Statement> |
ParseStart.STATEMENT |
Modifier and Type | Method and Description |
---|---|
Statement |
GeneratedJavaParser.BlockStatement() |
Statement |
GeneratedJavaParser.BlockStatementParseStart() |
Statement |
GeneratedJavaParser.ForStatement() |
Statement |
GeneratedJavaParser.LambdaBody() |
static Statement |
JavaParser.parseStatement(java.lang.String statement)
Parses the Java statement contained in a
String and returns a
Statement that represents it. |
Statement |
GeneratedJavaParser.Statement() |
Modifier and Type | Method and Description |
---|---|
NodeList<Statement> |
GeneratedJavaParser.Statements() |
Modifier and Type | Method and Description |
---|---|
(package private) static Expression |
GeneratedJavaParserSupport.generateLambda(GeneratedJavaParser generatedJavaParser,
Expression ret,
Statement lambdaBody)
Workaround for rather complex ambiguity that lambda's create
|
Modifier and Type | Field and Description |
---|---|
private Statement |
LambdaExpr.body |
Modifier and Type | Method and Description |
---|---|
Statement |
LambdaExpr.getBody() |
Modifier and Type | Method and Description |
---|---|
LambdaExpr |
LambdaExpr.setBody(Statement body) |
Constructor and Description |
---|
LambdaExpr(NodeList<Parameter> parameters,
Statement body,
boolean isEnclosingParameters) |
LambdaExpr(TokenRange tokenRange,
NodeList<Parameter> parameters,
Statement body,
boolean isEnclosingParameters)
This constructor is used by the parser and is considered private.
|
Modifier and Type | Method and Description |
---|---|
default <A extends Statement> |
NodeWithStatements.addAndGetStatement(A statement) |
Modifier and Type | Method and Description |
---|---|
default Statement |
NodeWithStatements.addAndGetStatement(int index,
Statement statement) |
Statement |
NodeWithBody.getBody() |
default Statement |
NodeWithStatements.getStatement(int i) |
Modifier and Type | Method and Description |
---|---|
NodeList<Statement> |
NodeWithStatements.getStatements() |
Modifier and Type | Method and Description |
---|---|
default Statement |
NodeWithStatements.addAndGetStatement(int index,
Statement statement) |
default N |
NodeWithStatements.addStatement(int index,
Statement statement) |
default N |
NodeWithStatements.addStatement(Statement statement) |
N |
NodeWithBody.setBody(Statement body) |
default N |
NodeWithStatements.setStatement(int i,
Statement statement) |
Modifier and Type | Method and Description |
---|---|
default N |
NodeWithStatements.copyStatements(NodeList<Statement> nodeList) |
N |
NodeWithStatements.setStatements(NodeList<Statement> statements) |
Modifier and Type | Class and Description |
---|---|
class |
AssertStmt
A usage of the keyword "assert"
In assert dead : "Wasn't expecting to be dead here"; the check is "dead" and the message is the string. |
class |
BlockStmt
Statements in between { and }.
|
class |
BreakStmt
A usage of the break keyword.
|
class |
ContinueStmt
A continue statement with an optional label;
continue brains;
continue; |
class |
DoStmt
A do-while.
|
class |
EmptyStmt
An empty statement is a ";" where a statement is expected.
|
class |
ExplicitConstructorInvocationStmt
A call to super or this in a constructor or initializer.
|
class |
ExpressionStmt
Used to wrap an expression so that it can take the place of a statement.
|
class |
ForeachStmt
A for-each statement.
|
class |
ForStmt
A classic for statement.
|
class |
IfStmt
An if-then-else statement.
|
class |
LabeledStmt
A statement that is labeled, like
label123: println("continuing"); |
class |
LocalClassDeclarationStmt
A class declaration inside a method.
|
class |
ReturnStmt
The return statement, with an optional expression to return.
|
class |
SwitchEntryStmt
One case in a switch statement.
|
class |
SwitchStmt
A switch statement.
|
class |
SynchronizedStmt
Usage of the synchronized keyword.
|
class |
ThrowStmt
Usage of the throw statement.
|
class |
TryStmt
The try statement.
|
class |
UnparsableStmt
A statement that had parse errors.
|
class |
WhileStmt
A while statement.
|
Modifier and Type | Field and Description |
---|---|
private Statement |
DoStmt.body |
private Statement |
ForStmt.body |
private Statement |
ForeachStmt.body |
private Statement |
WhileStmt.body |
private Statement |
IfStmt.elseStmt |
private Statement |
LabeledStmt.statement |
private Statement |
IfStmt.thenStmt |
Modifier and Type | Field and Description |
---|---|
private NodeList<Statement> |
BlockStmt.statements |
private NodeList<Statement> |
SwitchEntryStmt.statements |
Modifier and Type | Method and Description |
---|---|
Statement |
Statement.clone() |
Statement |
DoStmt.getBody() |
Statement |
ForStmt.getBody() |
Statement |
ForeachStmt.getBody() |
Statement |
WhileStmt.getBody() |
Statement |
LabeledStmt.getStatement() |
Statement |
IfStmt.getThenStmt() |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<Statement> |
IfStmt.getElseStmt() |
NodeList<Statement> |
BlockStmt.getStatements() |
NodeList<Statement> |
SwitchEntryStmt.getStatements() |
Modifier and Type | Method and Description |
---|---|
DoStmt |
DoStmt.setBody(Statement body) |
ForStmt |
ForStmt.setBody(Statement body) |
ForeachStmt |
ForeachStmt.setBody(Statement body) |
WhileStmt |
WhileStmt.setBody(Statement body) |
IfStmt |
IfStmt.setElseStmt(Statement elseStmt)
Sets the elseStmt
|
LabeledStmt |
LabeledStmt.setStatement(Statement statement) |
IfStmt |
IfStmt.setThenStmt(Statement thenStmt) |
Modifier and Type | Method and Description |
---|---|
BlockStmt |
BlockStmt.setStatements(NodeList<Statement> statements) |
SwitchEntryStmt |
SwitchEntryStmt.setStatements(NodeList<Statement> statements) |
Constructor and Description |
---|
DoStmt(Statement body,
Expression condition) |
DoStmt(TokenRange tokenRange,
Statement body,
Expression condition)
This constructor is used by the parser and is considered private.
|
ForeachStmt(TokenRange tokenRange,
VariableDeclarationExpr variable,
Expression iterable,
Statement body)
This constructor is used by the parser and is considered private.
|
ForeachStmt(VariableDeclarationExpr variable,
Expression iterable,
Statement body) |
ForStmt(NodeList<Expression> initialization,
Expression compare,
NodeList<Expression> update,
Statement body) |
ForStmt(TokenRange tokenRange,
NodeList<Expression> initialization,
Expression compare,
NodeList<Expression> update,
Statement body)
This constructor is used by the parser and is considered private.
|
IfStmt(Expression condition,
Statement thenStmt,
Statement elseStmt) |
IfStmt(TokenRange tokenRange,
Expression condition,
Statement thenStmt,
Statement elseStmt)
This constructor is used by the parser and is considered private.
|
LabeledStmt(SimpleName label,
Statement statement) |
LabeledStmt(java.lang.String label,
Statement statement) |
LabeledStmt(TokenRange tokenRange,
SimpleName label,
Statement statement)
This constructor is used by the parser and is considered private.
|
WhileStmt(Expression condition,
Statement body) |
WhileStmt(TokenRange tokenRange,
Expression condition,
Statement body)
This constructor is used by the parser and is considered private.
|
Constructor and Description |
---|
BlockStmt(NodeList<Statement> statements) |
BlockStmt(TokenRange tokenRange,
NodeList<Statement> statements)
This constructor is used by the parser and is considered private.
|
SwitchEntryStmt(Expression label,
NodeList<Statement> statements) |
SwitchEntryStmt(TokenRange tokenRange,
Expression label,
NodeList<Statement> statements)
This constructor is used by the parser and is considered private.
|
Modifier and Type | Method and Description |
---|---|
void |
InitializePropertyMetaModelsStatementsGenerator.generate(java.lang.Class<?> nodeClass,
java.lang.reflect.Field field,
ClassOrInterfaceDeclaration nodeMetaModelClass,
java.lang.String nodeMetaModelFieldName,
NodeList<Statement> initializePropertyMetaModelsStatements) |
void |
NodeMetaModelGenerator.generate(java.lang.Class<? extends Node> nodeClass,
ClassOrInterfaceDeclaration metaModelCoid,
NodeList<Statement> initializeNodeMetaModelsStatements,
NodeList<Statement> initializePropertyMetaModelsStatements,
NodeList<Statement> initializeConstructorParametersStatements,
SourceRoot sourceRoot) |
void |
NodeMetaModelGenerator.generate(java.lang.Class<? extends Node> nodeClass,
ClassOrInterfaceDeclaration metaModelCoid,
NodeList<Statement> initializeNodeMetaModelsStatements,
NodeList<Statement> initializePropertyMetaModelsStatements,
NodeList<Statement> initializeConstructorParametersStatements,
SourceRoot sourceRoot) |
void |
NodeMetaModelGenerator.generate(java.lang.Class<? extends Node> nodeClass,
ClassOrInterfaceDeclaration metaModelCoid,
NodeList<Statement> initializeNodeMetaModelsStatements,
NodeList<Statement> initializePropertyMetaModelsStatements,
NodeList<Statement> initializeConstructorParametersStatements,
SourceRoot sourceRoot) |
void |
InitializeConstructorParametersStatementsGenerator.generate(java.lang.Class<? extends Node> nodeClass,
NodeList<Statement> initializeConstructorParametersStatements) |
void |
InitializePropertyMetaModelsStatementsGenerator.generateDerivedProperty(java.lang.reflect.Method method,
ClassOrInterfaceDeclaration nodeMetaModelClass,
java.lang.String nodeMetaModelFieldName,
NodeList<Statement> initializePropertyMetaModelsStatements) |