Package | Description |
---|---|
com.github.javaparser | |
com.github.javaparser.ast.body | |
com.github.javaparser.ast.expr | |
com.github.javaparser.ast.stmt |
Modifier and Type | Method and Description |
---|---|
Expression |
InstanceJavaParser.parseExpression()
Parses the Java expression and returns a
Expression that
represents it. |
static Expression |
JavaParser.parseExpression(String expression)
Parses the Java expression contained in a
String and returns a
Expression that represents it. |
Modifier and Type | Method and Description |
---|---|
static void |
ASTHelper.addArgument(MethodCallExpr call,
Expression arg)
Adds the given argument to the method call.
|
static void |
ASTHelper.addStmt(BlockStmt block,
Expression expr)
Adds the given expression to the specified block.
|
Modifier and Type | Method and Description |
---|---|
Expression |
AnnotationMemberDeclaration.getDefaultValue() |
Expression |
VariableDeclarator.getInit() |
Modifier and Type | Method and Description |
---|---|
List<Expression> |
EnumConstantDeclaration.getArgs() |
Modifier and Type | Method and Description |
---|---|
void |
AnnotationMemberDeclaration.setDefaultValue(Expression defaultValue) |
void |
VariableDeclarator.setInit(Expression init) |
Modifier and Type | Method and Description |
---|---|
void |
EnumConstantDeclaration.setArgs(List<Expression> args) |
Constructor and Description |
---|
AnnotationMemberDeclaration(int beginLine,
int beginColumn,
int endLine,
int endColumn,
int modifiers,
List<AnnotationExpr> annotations,
Type type,
String name,
Expression defaultValue)
Deprecated.
prefer using Range objects.
|
AnnotationMemberDeclaration(int modifiers,
List<AnnotationExpr> annotations,
Type type,
String name,
Expression defaultValue) |
AnnotationMemberDeclaration(int modifiers,
Type type,
String name,
Expression defaultValue) |
AnnotationMemberDeclaration(Range range,
int modifiers,
List<AnnotationExpr> annotations,
Type type,
String name,
Expression defaultValue) |
VariableDeclarator(int beginLine,
int beginColumn,
int endLine,
int endColumn,
VariableDeclaratorId id,
Expression init)
Deprecated.
prefer using Range objects.
|
VariableDeclarator(Range range,
VariableDeclaratorId id,
Expression init) |
VariableDeclarator(VariableDeclaratorId id,
Expression init)
Defines the declaration of a variable.
|
Constructor and Description |
---|
EnumConstantDeclaration(int beginLine,
int beginColumn,
int endLine,
int endColumn,
List<AnnotationExpr> annotations,
String name,
List<Expression> args,
List<BodyDeclaration> classBody)
Deprecated.
prefer using Range objects.
|
EnumConstantDeclaration(List<AnnotationExpr> annotations,
String name,
List<Expression> args,
List<BodyDeclaration> classBody) |
EnumConstantDeclaration(Range range,
List<AnnotationExpr> annotations,
String name,
List<Expression> args,
List<BodyDeclaration> classBody) |
Modifier and Type | Class and Description |
---|---|
class |
AnnotationExpr |
class |
ArrayAccessExpr |
class |
ArrayCreationExpr |
class |
ArrayInitializerExpr |
class |
AssignExpr |
class |
BinaryExpr |
class |
BooleanLiteralExpr |
class |
CastExpr |
class |
CharLiteralExpr |
class |
ClassExpr
Defines an expression that accesses the class of a type.
|
class |
ConditionalExpr |
class |
DoubleLiteralExpr |
class |
EnclosedExpr |
class |
FieldAccessExpr |
class |
InstanceOfExpr |
class |
IntegerLiteralExpr |
class |
IntegerLiteralMinValueExpr |
class |
LambdaExpr
Lambda expression.
|
class |
LiteralExpr |
class |
LongLiteralExpr |
class |
LongLiteralMinValueExpr |
class |
MarkerAnnotationExpr |
class |
MethodCallExpr |
class |
MethodReferenceExpr
Method reference expressions introduced in Java 8 specifically designed to simplify lambda Expressions.
|
class |
NameExpr |
class |
NormalAnnotationExpr |
class |
NullLiteralExpr |
class |
ObjectCreationExpr
Defines constructor call expression.
|
class |
QualifiedNameExpr |
class |
SingleMemberAnnotationExpr |
class |
StringLiteralExpr
Java® Language Specification 3.10.5 String Literals
|
class |
SuperExpr |
class |
ThisExpr |
class |
TypeExpr
This class is just instantiated as scopes for MethodReferenceExpr nodes to encapsulate Types.
|
class |
UnaryExpr |
class |
VariableDeclarationExpr |
Modifier and Type | Method and Description |
---|---|
Expression |
ThisExpr.getClassExpr() |
Expression |
SuperExpr.getClassExpr() |
Expression |
ConditionalExpr.getCondition() |
Expression |
ConditionalExpr.getElseExpr() |
Expression |
InstanceOfExpr.getExpr() |
Expression |
UnaryExpr.getExpr() |
Expression |
CastExpr.getExpr() |
Expression |
ArrayAccessExpr.getIndex() |
Expression |
EnclosedExpr.getInner() |
Expression |
BinaryExpr.getLeft() |
Expression |
SingleMemberAnnotationExpr.getMemberValue() |
Expression |
ArrayAccessExpr.getName() |
Expression |
BinaryExpr.getRight() |
Expression |
MethodCallExpr.getScope() |
Expression |
MethodReferenceExpr.getScope() |
Expression |
ObjectCreationExpr.getScope() |
Expression |
FieldAccessExpr.getScope() |
Expression |
AssignExpr.getTarget() |
Expression |
ConditionalExpr.getThenExpr() |
Expression |
AssignExpr.getValue() |
Expression |
MemberValuePair.getValue() |
Modifier and Type | Method and Description |
---|---|
List<Expression> |
MethodCallExpr.getArgs() |
List<Expression> |
ObjectCreationExpr.getArgs() |
List<Expression> |
ArrayCreationExpr.getDimensions() |
List<Expression> |
ArrayInitializerExpr.getValues() |
Modifier and Type | Method and Description |
---|---|
void |
ThisExpr.setClassExpr(Expression classExpr) |
void |
SuperExpr.setClassExpr(Expression classExpr) |
void |
ConditionalExpr.setCondition(Expression condition) |
void |
ConditionalExpr.setElseExpr(Expression elseExpr) |
void |
InstanceOfExpr.setExpr(Expression expr) |
void |
UnaryExpr.setExpr(Expression expr) |
void |
CastExpr.setExpr(Expression expr) |
void |
ArrayAccessExpr.setIndex(Expression index) |
void |
EnclosedExpr.setInner(Expression inner) |
void |
BinaryExpr.setLeft(Expression left) |
void |
SingleMemberAnnotationExpr.setMemberValue(Expression memberValue) |
void |
ArrayAccessExpr.setName(Expression name) |
void |
BinaryExpr.setRight(Expression right) |
void |
MethodCallExpr.setScope(Expression scope) |
void |
MethodReferenceExpr.setScope(Expression scope) |
void |
ObjectCreationExpr.setScope(Expression scope) |
void |
FieldAccessExpr.setScope(Expression scope) |
void |
AssignExpr.setTarget(Expression target) |
void |
ConditionalExpr.setThenExpr(Expression thenExpr) |
void |
AssignExpr.setValue(Expression value) |
void |
MemberValuePair.setValue(Expression value) |
Modifier and Type | Method and Description |
---|---|
void |
MethodCallExpr.setArgs(List<Expression> args) |
void |
ObjectCreationExpr.setArgs(List<Expression> args) |
void |
ArrayCreationExpr.setDimensions(List<Expression> dimensions) |
void |
ArrayInitializerExpr.setValues(List<Expression> values) |
Constructor and Description |
---|
ArrayAccessExpr(Expression name,
Expression index) |
ArrayAccessExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression name,
Expression index)
Deprecated.
prefer using Range objects.
|
ArrayAccessExpr(Range range,
Expression name,
Expression index) |
AssignExpr(Expression target,
Expression value,
AssignExpr.Operator op) |
AssignExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression target,
Expression value,
AssignExpr.Operator op)
Deprecated.
prefer using Range objects.
|
AssignExpr(Range range,
Expression target,
Expression value,
AssignExpr.Operator op) |
BinaryExpr(Expression left,
Expression right,
BinaryExpr.Operator op) |
BinaryExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression left,
Expression right,
BinaryExpr.Operator op)
Deprecated.
prefer using Range objects.
|
BinaryExpr(Range range,
Expression left,
Expression right,
BinaryExpr.Operator op) |
CastExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Type type,
Expression expr)
Deprecated.
prefer using Range objects.
|
CastExpr(Range range,
Type type,
Expression expr) |
CastExpr(Type type,
Expression expr) |
ConditionalExpr(Expression condition,
Expression thenExpr,
Expression elseExpr) |
ConditionalExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression condition,
Expression thenExpr,
Expression elseExpr)
Deprecated.
prefer using Range objects.
|
ConditionalExpr(Range range,
Expression condition,
Expression thenExpr,
Expression elseExpr) |
EnclosedExpr(Expression inner) |
EnclosedExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression inner)
Deprecated.
prefer using Range objects.
|
EnclosedExpr(Range range,
Expression inner) |
FieldAccessExpr(Expression scope,
String field) |
FieldAccessExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression scope,
List<Type> typeArgs,
String field)
Deprecated.
prefer using Range objects.
|
FieldAccessExpr(Range range,
Expression scope,
List<Type> typeArgs,
String field) |
InstanceOfExpr(Expression expr,
Type type) |
InstanceOfExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression expr,
Type type)
Deprecated.
prefer using Range objects.
|
InstanceOfExpr(Range range,
Expression expr,
Type type) |
MemberValuePair(int beginLine,
int beginColumn,
int endLine,
int endColumn,
String name,
Expression value)
Deprecated.
prefer using Range objects.
|
MemberValuePair(Range range,
String name,
Expression value) |
MemberValuePair(String name,
Expression value) |
MethodCallExpr(Expression scope,
String name) |
MethodCallExpr(Expression scope,
String name,
List<Expression> args) |
MethodCallExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression scope,
List<Type> typeArgs,
String name,
List<Expression> args)
Deprecated.
prefer using Range objects.
|
MethodCallExpr(Range range,
Expression scope,
List<Type> typeArgs,
String name,
List<Expression> args) |
MethodReferenceExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression scope,
TypeArguments typeArguments,
String identifier)
Deprecated.
prefer using Range objects.
|
MethodReferenceExpr(Range range,
Expression scope,
TypeArguments typeArguments,
String identifier) |
ObjectCreationExpr(Expression scope,
ClassOrInterfaceType type,
List<Expression> args)
Defines a call to a constructor.
|
ObjectCreationExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression scope,
ClassOrInterfaceType type,
List<Type> typeArgs,
List<Expression> args,
List<BodyDeclaration> anonymousBody)
Deprecated.
prefer using Range objects.
|
ObjectCreationExpr(Range range,
Expression scope,
ClassOrInterfaceType type,
List<Type> typeArgs,
List<Expression> args,
List<BodyDeclaration> anonymousBody) |
SingleMemberAnnotationExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
NameExpr name,
Expression memberValue)
Deprecated.
prefer using Range objects.
|
SingleMemberAnnotationExpr(NameExpr name,
Expression memberValue) |
SingleMemberAnnotationExpr(Range range,
NameExpr name,
Expression memberValue) |
SuperExpr(Expression classExpr) |
SuperExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression classExpr)
Deprecated.
prefer using Range objects.
|
SuperExpr(Range range,
Expression classExpr) |
ThisExpr(Expression classExpr) |
ThisExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression classExpr)
Deprecated.
prefer using Range objects.
|
ThisExpr(Range range,
Expression classExpr) |
UnaryExpr(Expression expr,
UnaryExpr.Operator op) |
UnaryExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression expr,
UnaryExpr.Operator op)
Deprecated.
prefer using Range objects.
|
UnaryExpr(Range range,
Expression expr,
UnaryExpr.Operator op) |
Constructor and Description |
---|
ArrayCreationExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Type type,
List<Expression> dimensions,
int arrayCount)
Deprecated.
prefer using Range objects.
|
ArrayCreationExpr(Range range,
Type type,
List<Expression> dimensions,
int arrayCount) |
ArrayCreationExpr(Type type,
List<Expression> dimensions,
int arrayCount) |
ArrayInitializerExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
List<Expression> values)
Deprecated.
prefer using Range objects.
|
ArrayInitializerExpr(List<Expression> values) |
ArrayInitializerExpr(Range range,
List<Expression> values) |
MethodCallExpr(Expression scope,
String name,
List<Expression> args) |
MethodCallExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression scope,
List<Type> typeArgs,
String name,
List<Expression> args)
Deprecated.
prefer using Range objects.
|
MethodCallExpr(Range range,
Expression scope,
List<Type> typeArgs,
String name,
List<Expression> args) |
ObjectCreationExpr(Expression scope,
ClassOrInterfaceType type,
List<Expression> args)
Defines a call to a constructor.
|
ObjectCreationExpr(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression scope,
ClassOrInterfaceType type,
List<Type> typeArgs,
List<Expression> args,
List<BodyDeclaration> anonymousBody)
Deprecated.
prefer using Range objects.
|
ObjectCreationExpr(Range range,
Expression scope,
ClassOrInterfaceType type,
List<Type> typeArgs,
List<Expression> args,
List<BodyDeclaration> anonymousBody) |
Modifier and Type | Method and Description |
---|---|
Expression |
AssertStmt.getCheck() |
Expression |
ForStmt.getCompare() |
Expression |
DoStmt.getCondition() |
Expression |
IfStmt.getCondition() |
Expression |
WhileStmt.getCondition() |
Expression |
SynchronizedStmt.getExpr() |
Expression |
ExplicitConstructorInvocationStmt.getExpr() |
Expression |
ThrowStmt.getExpr() |
Expression |
ReturnStmt.getExpr() |
Expression |
ExpressionStmt.getExpression() |
Expression |
ForeachStmt.getIterable() |
Expression |
SwitchEntryStmt.getLabel() |
Expression |
AssertStmt.getMessage() |
Expression |
SwitchStmt.getSelector() |
Modifier and Type | Method and Description |
---|---|
List<Expression> |
ExplicitConstructorInvocationStmt.getArgs() |
List<Expression> |
ForStmt.getInit() |
List<Expression> |
ForStmt.getUpdate() |
Modifier and Type | Method and Description |
---|---|
void |
AssertStmt.setCheck(Expression check) |
void |
ForStmt.setCompare(Expression compare) |
void |
DoStmt.setCondition(Expression condition) |
void |
IfStmt.setCondition(Expression condition) |
void |
WhileStmt.setCondition(Expression condition) |
void |
SynchronizedStmt.setExpr(Expression expr) |
void |
ExplicitConstructorInvocationStmt.setExpr(Expression expr) |
void |
ThrowStmt.setExpr(Expression expr) |
void |
ReturnStmt.setExpr(Expression expr) |
void |
ExpressionStmt.setExpression(Expression expr) |
void |
ForeachStmt.setIterable(Expression iterable) |
void |
SwitchEntryStmt.setLabel(Expression label) |
void |
AssertStmt.setMessage(Expression msg) |
void |
SwitchStmt.setSelector(Expression selector) |
Modifier and Type | Method and Description |
---|---|
void |
ExplicitConstructorInvocationStmt.setArgs(List<Expression> args) |
void |
ForStmt.setInit(List<Expression> init) |
void |
ForStmt.setUpdate(List<Expression> update) |
Constructor and Description |
---|
AssertStmt(Expression check) |
AssertStmt(Expression check,
Expression msg) |
AssertStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression check,
Expression msg)
Deprecated.
prefer using Range objects.
|
AssertStmt(Range range,
Expression check,
Expression msg) |
DoStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Statement body,
Expression condition)
Deprecated.
prefer using Range objects.
|
DoStmt(Range range,
Statement body,
Expression condition) |
DoStmt(Statement body,
Expression condition) |
ExplicitConstructorInvocationStmt(boolean isThis,
Expression expr,
List<Expression> args) |
ExplicitConstructorInvocationStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
List<Type> typeArgs,
boolean isThis,
Expression expr,
List<Expression> args)
Deprecated.
prefer using Range objects.
|
ExplicitConstructorInvocationStmt(Range range,
List<Type> typeArgs,
boolean isThis,
Expression expr,
List<Expression> args) |
ExpressionStmt(Expression expr) |
ExpressionStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression expr)
Deprecated.
prefer using Range objects.
|
ExpressionStmt(Range range,
Expression expr) |
ForeachStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
VariableDeclarationExpr var,
Expression iterable,
Statement body)
Deprecated.
prefer using Range objects.
|
ForeachStmt(Range range,
VariableDeclarationExpr var,
Expression iterable,
Statement body) |
ForeachStmt(VariableDeclarationExpr var,
Expression iterable,
Statement body) |
ForStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
List<Expression> init,
Expression compare,
List<Expression> update,
Statement body)
Deprecated.
prefer using Range objects.
|
ForStmt(List<Expression> init,
Expression compare,
List<Expression> update,
Statement body) |
ForStmt(Range range,
List<Expression> init,
Expression compare,
List<Expression> update,
Statement body) |
IfStmt(Expression condition,
Statement thenStmt,
Statement elseStmt) |
IfStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression condition,
Statement thenStmt,
Statement elseStmt)
Deprecated.
prefer using Range objects.
|
IfStmt(Range range,
Expression condition,
Statement thenStmt,
Statement elseStmt) |
ReturnStmt(Expression expr) |
ReturnStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression expr)
Deprecated.
prefer using Range objects.
|
ReturnStmt(Range range,
Expression expr) |
SwitchEntryStmt(Expression label,
List<Statement> stmts) |
SwitchEntryStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression label,
List<Statement> stmts)
Deprecated.
prefer using Range objects.
|
SwitchEntryStmt(Range range,
Expression label,
List<Statement> stmts) |
SwitchStmt(Expression selector,
List<SwitchEntryStmt> entries) |
SwitchStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression selector,
List<SwitchEntryStmt> entries)
Deprecated.
prefer using Range objects.
|
SwitchStmt(Range range,
Expression selector,
List<SwitchEntryStmt> entries) |
SynchronizedStmt(Expression expr,
BlockStmt block) |
SynchronizedStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression expr,
BlockStmt block)
Deprecated.
prefer using Range objects.
|
SynchronizedStmt(Range range,
Expression expr,
BlockStmt block) |
ThrowStmt(Expression expr) |
ThrowStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression expr)
Deprecated.
prefer using Range objects.
|
ThrowStmt(Range range,
Expression expr) |
WhileStmt(Expression condition,
Statement body) |
WhileStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Expression condition,
Statement body)
Deprecated.
prefer using Range objects.
|
WhileStmt(Range range,
Expression condition,
Statement body) |
Constructor and Description |
---|
ExplicitConstructorInvocationStmt(boolean isThis,
Expression expr,
List<Expression> args) |
ExplicitConstructorInvocationStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
List<Type> typeArgs,
boolean isThis,
Expression expr,
List<Expression> args)
Deprecated.
prefer using Range objects.
|
ExplicitConstructorInvocationStmt(Range range,
List<Type> typeArgs,
boolean isThis,
Expression expr,
List<Expression> args) |
ForStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
List<Expression> init,
Expression compare,
List<Expression> update,
Statement body)
Deprecated.
prefer using Range objects.
|
ForStmt(int beginLine,
int beginColumn,
int endLine,
int endColumn,
List<Expression> init,
Expression compare,
List<Expression> update,
Statement body)
Deprecated.
prefer using Range objects.
|
ForStmt(List<Expression> init,
Expression compare,
List<Expression> update,
Statement body) |
ForStmt(List<Expression> init,
Expression compare,
List<Expression> update,
Statement body) |
ForStmt(Range range,
List<Expression> init,
Expression compare,
List<Expression> update,
Statement body) |
ForStmt(Range range,
List<Expression> init,
Expression compare,
List<Expression> update,
Statement body) |
Copyright © 2007–2016. All rights reserved.