Uses of Class
com.github.javaparser.ast.expr.Expression
Packages that use Expression
Package
Description
Implementation of model based on JavaParser.
Implementation of model based on Javassist.
Implementation of model based on reflection.
-
Uses of Expression in com.github.javaparser
Fields in com.github.javaparser with type parameters of type ExpressionMethods in com.github.javaparser with type parameters of type ExpressionModifier and TypeMethodDescription<T extends Expression>
ParseResult<T> JavaParser.parseExpression
(String expression) Parses the Java expression contained in aString
and returns aExpression
that represents it.<T extends Expression>
TJavaParserAdapter.parseExpression
(String expression) static <T extends Expression>
TStaticJavaParser.parseExpression
(String expression) Parses the Java expression contained in aString
and returns aExpression
that represents it.Methods in com.github.javaparser that return ExpressionModifier and TypeMethodDescriptionfinal Expression
GeneratedJavaParser.AdditiveExpression()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.18final Expression
GeneratedJavaParser.AllocationExpression
(Expression scope) https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.9final Expression
GeneratedJavaParser.AndExpression()
Note subtle distinctions between inclusive and exclusive expressions.final Expression
GeneratedJavaParser.BooleanLiteral()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-3.html#jls-3.10.3final Expression
GeneratedJavaParser.CastExpression()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.16final Expression
GeneratedJavaParser.ConditionalAndExpression()
Note subtle distinctions between inclusive and exclusive expressions.final Expression
GeneratedJavaParser.ConditionalExpression()
// TODO: Examine further re: missing(?)LambdaExpression
or whether it is permissive enough to include it.final Expression
GeneratedJavaParser.ConditionalOrExpression()
Note subtle distinctions between inclusive and exclusive expressions.final Expression
GeneratedJavaParser.DefaultValue()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-9.html#jls-9.6.2final Expression
GeneratedJavaParser.EqualityExpression()
// Note that instanceof is aRelationalExpression
within the JLS, which differs from JavaParser https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.21final Expression
GeneratedJavaParser.ExclusiveOrExpression()
Note subtle distinctions between inclusive and exclusive expressions.final Expression
GeneratedJavaParser.Expression()
final Expression
GeneratedJavaParser.ExpressionParseStart()
(package private) Expression
GeneratedJavaParserBase.generateLambda
(Expression ret, Statement lambdaBody) Workaround for rather complex ambiguity that lambda's createfinal Expression
GeneratedJavaParser.InclusiveOrExpression()
Note subtle distinctions between inclusive and exclusive expressions.final Expression
GeneratedJavaParser.InstanceOfExpression()
// Note that instanceof is aRelationalExpression
within the JLS, which differs from JavaParser https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.20final Expression
GeneratedJavaParser.Literal()
Note that a Long Literal is defined as anIntegerLiteral
, suffixed by "L" https://docs.oracle.com/javase/specs/jls/se15/html/jls-3.html#jls-3.10.1final Expression
GeneratedJavaParser.MemberValue()
Note thatMemberValue
(JavaParser) is synonymous withElementValue
(JLS) https://docs.oracle.com/javase/specs/jls/se15/html/jls-9.html#jls-9.7.1 https://docs.oracle.com/javase/specs/jls/se15/html/jls-9.html#jls-ElementValuefinal Expression
GeneratedJavaParser.MemberValueArrayInitializer()
Note thatMemberValueArrayInitializer
(JavaParser) is synonymous withElementValueArrayInitializer
(JLS) https://docs.oracle.com/javase/specs/jls/se15/html/jls-9.html#jls-9.7.1final Expression
GeneratedJavaParser.MultiplicativeExpression()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.17final Expression
GeneratedJavaParser.NullLiteral()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-3.html#jls-3.10.8final Expression
GeneratedJavaParser.PostfixExpression()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.15final Expression
GeneratedJavaParser.PreDecrementExpression()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.15final Expression
GeneratedJavaParser.PreIncrementExpression()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.15final Expression
GeneratedJavaParser.PrimaryExpression()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.8final Expression
GeneratedJavaParser.PrimaryExpressionWithoutSuperSuffix()
// TODO: Unclear exactly which part of the JLS this relates to - a JavaParser-specific thing with no 1:1 mapping, perhaps?final Expression
GeneratedJavaParser.PrimaryPrefix()
// TODO: Unclear exactly which part of the JLS this relates to - a JavaParser-specific thing with no 1:1 mapping, perhaps?final Expression
GeneratedJavaParser.PrimarySuffix
(Expression scope) // TODO: Unclear exactly which part of the JLS this relates to - a JavaParser-specific thing with no 1:1 mapping, perhaps?final Expression
GeneratedJavaParser.PrimarySuffixWithoutSuper
(Expression scope) // TODO: Unclear exactly which part of the JLS this relates to - a JavaParser-specific thing with no 1:1 mapping, perhaps?final Expression
GeneratedJavaParser.RelationalExpression()
// Note that instanceof is aRelationalExpression
within the JLS, which differs from JavaParser https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.20final Expression
GeneratedJavaParser.Resource()
// TODO: Examine more closely.final Expression
GeneratedJavaParser.ShiftExpression()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.19final Expression
GeneratedJavaParser.UnaryExpression()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.15final Expression
GeneratedJavaParser.UnaryExpressionNotPlusMinus()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.15final Expression
GeneratedJavaParser.VariableInitializer()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-8.html#jls-8.3Methods in com.github.javaparser that return types with arguments of type ExpressionModifier and TypeMethodDescriptionfinal NodeList
<Expression> GeneratedJavaParser.ArgumentList()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.12final NodeList
<Expression> GeneratedJavaParser.Arguments()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.12final NodeList
<Expression> GeneratedJavaParser.ExpressionList()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-14.html#jls-14.14final NodeList
<Expression> GeneratedJavaParser.ForInit()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-14.html#jls-14.14final NodeList
<Expression> GeneratedJavaParser.ForUpdate()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-14.html#jls-14.14final NodeList
<Expression> GeneratedJavaParser.Resources()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-14.html#jls-14.20.3final NodeList
<Expression> GeneratedJavaParser.ResourceSpecification()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-14.html#jls-14.20.3Methods in com.github.javaparser with parameters of type ExpressionModifier and TypeMethodDescriptionfinal Expression
GeneratedJavaParser.AllocationExpression
(Expression scope) https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.9(package private) Expression
GeneratedJavaParserBase.generateLambda
(Expression ret, Statement lambdaBody) Workaround for rather complex ambiguity that lambda's createfinal Expression
GeneratedJavaParser.PrimarySuffix
(Expression scope) // TODO: Unclear exactly which part of the JLS this relates to - a JavaParser-specific thing with no 1:1 mapping, perhaps?final Expression
GeneratedJavaParser.PrimarySuffixWithoutSuper
(Expression scope) // TODO: Unclear exactly which part of the JLS this relates to - a JavaParser-specific thing with no 1:1 mapping, perhaps?(package private) Name
GeneratedJavaParserBase.scopeToName
(Expression scope) Converts a NameExpr or a FieldAccessExpr scope to a Name.Method parameters in com.github.javaparser with type arguments of type ExpressionModifier and TypeMethodDescription(package private) ArrayCreationExpr
GeneratedJavaParserBase.juggleArrayCreation
(TokenRange range, List<TokenRange> levelRanges, Type type, NodeList<Expression> dimensions, List<NodeList<AnnotationExpr>> arrayAnnotations, ArrayInitializerExpr arrayInitializerExpr) Throws together an ArrayCreationExpr from a lot of pieces -
Uses of Expression in com.github.javaparser.ast
Fields in com.github.javaparser.ast declared as ExpressionMethods in com.github.javaparser.ast that return types with arguments of type ExpressionMethods in com.github.javaparser.ast with parameters of type ExpressionModifier and TypeMethodDescriptionArrayCreationLevel.setDimension
(Expression dimension) Sets the dimensionConstructors in com.github.javaparser.ast with parameters of type ExpressionModifierConstructorDescriptionArrayCreationLevel
(Expression dimension) ArrayCreationLevel
(Expression dimension, NodeList<AnnotationExpr> annotations) ArrayCreationLevel
(TokenRange tokenRange, Expression dimension, NodeList<AnnotationExpr> annotations) This constructor is used by the parser and is considered private. -
Uses of Expression in com.github.javaparser.ast.body
Fields in com.github.javaparser.ast.body declared as ExpressionModifier and TypeFieldDescriptionprivate Expression
AnnotationMemberDeclaration.defaultValue
private Expression
VariableDeclarator.initializer
Fields in com.github.javaparser.ast.body with type parameters of type ExpressionMethods in com.github.javaparser.ast.body that return types with arguments of type ExpressionModifier and TypeMethodDescriptionEnumConstantDeclaration.getArguments()
AnnotationMemberDeclaration.getDefaultValue()
VariableDeclarator.getInitializer()
Methods in com.github.javaparser.ast.body with parameters of type ExpressionModifier and TypeMethodDescriptionAnnotationMemberDeclaration.setDefaultValue
(Expression defaultValue) Sets the default valueVariableDeclarator.setInitializer
(Expression initializer) Sets the initializer expressionMethod parameters in com.github.javaparser.ast.body with type arguments of type ExpressionModifier and TypeMethodDescriptionEnumConstantDeclaration.setArguments
(NodeList<Expression> arguments) Constructors in com.github.javaparser.ast.body with parameters of type ExpressionModifierConstructorDescriptionAnnotationMemberDeclaration
(NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, SimpleName name, Expression defaultValue) AnnotationMemberDeclaration
(NodeList<Modifier> modifiers, Type type, String name, Expression defaultValue) AnnotationMemberDeclaration
(TokenRange tokenRange, NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, SimpleName name, Expression defaultValue) This constructor is used by the parser and is considered private.VariableDeclarator
(Type type, SimpleName name, Expression initializer) Defines the declaration of a variable.VariableDeclarator
(Type type, String variableName, Expression initializer) VariableDeclarator
(TokenRange tokenRange, Type type, SimpleName name, Expression initializer) This constructor is used by the parser and is considered private. -
Uses of Expression in com.github.javaparser.ast.expr
Subclasses of Expression in com.github.javaparser.ast.exprModifier and TypeClassDescriptionclass
A base class for the different types of annotations.class
Array brackets [] being used to get a value from an array.class
new int[5][4][][]
ornew int[][]{{1},{2,3}}
.class
The initialization of an array.class
An assignment expression.class
An expression with an expression on the left, an expression on the right, and an operator in the middle.class
The boolean literals.class
A typecast.class
A literal character.class
Defines an expression that accesses the class of a type.class
The ternary conditional expression.class
A float or a double constant.class
An expression between ( ).class
Access of a field of an object or a class.class
The instanceof statementclass
All ways to specify an int literal.class
A lambda expressionclass
A base class for all literal expressions.class
Any literal value that is stored internally as a String.class
All ways to specify a long literal.class
An annotation that uses only the annotation type name.class
A method call on an object or a class.class
Method reference expressions introduced in Java 8 specifically designed to simplify lambda Expressions.class
Whenever a SimpleName is used in an expression, it is wrapped in NameExpr.class
An annotation that has zero or more key-value pairs.@Mapping(a=5, d=10)
class
A literal "null".class
A constructor call.class
Pattern Matching in Javaclass
Record Patternsclass
An annotation that has a single value.class
A literal string.class
An occurrence of the "super" keyword.class
The switch expressionclass
A text blockclass
An occurrence of the "this" keyword.class
This class is just instantiated as scopes for MethodReferenceExpr nodes to encapsulate Types.class
The instanceof statementclass
An expression where an operator is applied to a single expression.class
A declaration of variables.Fields in com.github.javaparser.ast.expr declared as ExpressionModifier and TypeFieldDescriptionprivate Expression
ConditionalExpr.condition
private Expression
ConditionalExpr.elseExpr
private Expression
CastExpr.expression
private Expression
InstanceOfExpr.expression
private Expression
UnaryExpr.expression
private Expression
ArrayAccessExpr.index
private Expression
EnclosedExpr.inner
private Expression
BinaryExpr.left
private Expression
SingleMemberAnnotationExpr.memberValue
private Expression
ArrayAccessExpr.name
private Expression
BinaryExpr.right
private Expression
FieldAccessExpr.scope
private Expression
MethodCallExpr.scope
private Expression
MethodReferenceExpr.scope
private Expression
ObjectCreationExpr.scope
private Expression
SwitchExpr.selector
private Expression
AssignExpr.target
private Expression
ConditionalExpr.thenExpr
private Expression
AssignExpr.value
private Expression
MemberValuePair.value
Fields in com.github.javaparser.ast.expr with type parameters of type ExpressionModifier and TypeFieldDescriptionprivate NodeList
<Expression> MethodCallExpr.arguments
private NodeList
<Expression> ObjectCreationExpr.arguments
static final Function
<Expression, Expression> Expression.EXCLUDE_ENCLOSED_EXPR
AFunction
that returns its argument (anExpression
) when the argument is not anEnclosedExpr
, otherwise the firstExpression
down the argument's 'inner' path that is not anEnclosedExpr
.static final Function
<Expression, Expression> Expression.EXCLUDE_ENCLOSED_EXPR
AFunction
that returns its argument (anExpression
) when the argument is not anEnclosedExpr
, otherwise the firstExpression
down the argument's 'inner' path that is not anEnclosedExpr
.private NodeList
<Expression> ArrayInitializerExpr.values
Methods in com.github.javaparser.ast.expr that return ExpressionModifier and TypeMethodDescriptionExpression.clone()
ConditionalExpr.getCondition()
ConditionalExpr.getElseExpr()
CastExpr.getExpression()
InstanceOfExpr.getExpression()
UnaryExpr.getExpression()
ArrayAccessExpr.getIndex()
EnclosedExpr.getInner()
BinaryExpr.getLeft()
SingleMemberAnnotationExpr.getMemberValue()
ArrayAccessExpr.getName()
BinaryExpr.getRight()
FieldAccessExpr.getScope()
MethodReferenceExpr.getScope()
SwitchExpr.getSelector()
AssignExpr.getTarget()
ConditionalExpr.getThenExpr()
AssignExpr.getValue()
MemberValuePair.getValue()
Methods in com.github.javaparser.ast.expr that return types with arguments of type ExpressionModifier and TypeMethodDescriptionMethodCallExpr.getArguments()
ObjectCreationExpr.getArguments()
LambdaExpr.getExpressionBody()
MethodCallExpr.getScope()
ObjectCreationExpr.getScope()
ArrayInitializerExpr.getValues()
Methods in com.github.javaparser.ast.expr with parameters of type ExpressionModifier and TypeMethodDescriptionNormalAnnotationExpr.addPair
(String key, Expression value) adds a pair to this annotationConditionalExpr.setCondition
(Expression condition) ConditionalExpr.setElseExpr
(Expression elseExpr) CastExpr.setExpression
(Expression expression) InstanceOfExpr.setExpression
(Expression expression) UnaryExpr.setExpression
(Expression expression) ArrayAccessExpr.setIndex
(Expression index) EnclosedExpr.setInner
(Expression inner) Sets the inner expressionBinaryExpr.setLeft
(Expression left) SingleMemberAnnotationExpr.setMemberValue
(Expression memberValue) ArrayAccessExpr.setName
(Expression name) BinaryExpr.setRight
(Expression right) FieldAccessExpr.setScope
(Expression scope) Sets the scopeMethodCallExpr.setScope
(Expression scope) MethodReferenceExpr.setScope
(Expression scope) ObjectCreationExpr.setScope
(Expression scope) Sets the scopeSwitchExpr.setSelector
(Expression selector) AssignExpr.setTarget
(Expression target) ConditionalExpr.setThenExpr
(Expression thenExpr) AssignExpr.setValue
(Expression value) MemberValuePair.setValue
(Expression value) Method parameters in com.github.javaparser.ast.expr with type arguments of type ExpressionModifier and TypeMethodDescriptionMethodCallExpr.setArguments
(NodeList<Expression> arguments) ObjectCreationExpr.setArguments
(NodeList<Expression> arguments) ArrayInitializerExpr.setValues
(NodeList<Expression> values) Constructors in com.github.javaparser.ast.expr with parameters of type ExpressionModifierConstructorDescriptionArrayAccessExpr
(Expression name, Expression index) ArrayAccessExpr
(TokenRange tokenRange, Expression name, Expression index) This constructor is used by the parser and is considered private.AssignExpr
(Expression target, Expression value, AssignExpr.Operator operator) AssignExpr
(TokenRange tokenRange, Expression target, Expression value, AssignExpr.Operator operator) This constructor is used by the parser and is considered private.BinaryExpr
(Expression left, Expression right, BinaryExpr.Operator operator) BinaryExpr
(TokenRange tokenRange, Expression left, Expression right, BinaryExpr.Operator operator) This constructor is used by the parser and is considered private.CastExpr
(Type type, Expression expression) CastExpr
(TokenRange tokenRange, Type type, Expression expression) This constructor is used by the parser and is considered private.ConditionalExpr
(Expression condition, Expression thenExpr, Expression elseExpr) ConditionalExpr
(TokenRange tokenRange, Expression condition, Expression thenExpr, Expression elseExpr) This constructor is used by the parser and is considered private.EnclosedExpr
(Expression inner) EnclosedExpr
(TokenRange tokenRange, Expression inner) This constructor is used by the parser and is considered private.FieldAccessExpr
(Expression scope, NodeList<Type> typeArguments, SimpleName name) FieldAccessExpr
(Expression scope, String name) FieldAccessExpr
(TokenRange tokenRange, Expression scope, NodeList<Type> typeArguments, SimpleName name) This constructor is used by the parser and is considered private.InstanceOfExpr
(Expression expression, ReferenceType type) InstanceOfExpr
(Expression expression, ReferenceType type, PatternExpr pattern) InstanceOfExpr
(TokenRange tokenRange, Expression expression, ReferenceType type, PatternExpr pattern) This constructor is used by the parser and is considered private.LambdaExpr
(Parameter parameter, Expression body) Creates a single parameter lambda expression.LambdaExpr
(NodeList<Parameter> parameters, Expression body) Creates a zero or multi-parameter lambda expression with its parameters wrapped in ( ).MemberValuePair
(SimpleName name, Expression value) MemberValuePair
(TokenRange tokenRange, SimpleName name, Expression value) This constructor is used by the parser and is considered private.MemberValuePair
(String name, Expression value) MethodCallExpr
(Expression scope, SimpleName name) MethodCallExpr
(Expression scope, SimpleName name, NodeList<Expression> arguments) MethodCallExpr
(Expression scope, NodeList<Type> typeArguments, SimpleName name, NodeList<Expression> arguments) MethodCallExpr
(Expression scope, NodeList<Type> typeArguments, String name, NodeList<Expression> arguments) MethodCallExpr
(Expression scope, String name) MethodCallExpr
(Expression scope, String name, NodeList<Expression> arguments) MethodCallExpr
(TokenRange tokenRange, Expression scope, NodeList<Type> typeArguments, SimpleName name, NodeList<Expression> arguments) This constructor is used by the parser and is considered private.MethodCallExpr
(String name, Expression... arguments) MethodReferenceExpr
(Expression scope, NodeList<Type> typeArguments, String identifier) MethodReferenceExpr
(TokenRange tokenRange, Expression scope, NodeList<Type> typeArguments, String identifier) This constructor is used by the parser and is considered private.ObjectCreationExpr
(Expression scope, ClassOrInterfaceType type, NodeList<Expression> arguments) Defines a call to a constructor.ObjectCreationExpr
(Expression scope, ClassOrInterfaceType type, NodeList<Type> typeArguments, NodeList<Expression> arguments, NodeList<BodyDeclaration<?>> anonymousClassBody) ObjectCreationExpr
(TokenRange tokenRange, Expression scope, ClassOrInterfaceType type, NodeList<Type> typeArguments, NodeList<Expression> arguments, NodeList<BodyDeclaration<?>> anonymousClassBody) This constructor is used by the parser and is considered private.SingleMemberAnnotationExpr
(Name name, Expression memberValue) SingleMemberAnnotationExpr
(TokenRange tokenRange, Name name, Expression memberValue) This constructor is used by the parser and is considered private.SwitchExpr
(Expression selector, NodeList<SwitchEntry> entries) SwitchExpr
(TokenRange tokenRange, Expression selector, NodeList<SwitchEntry> entries) This constructor is used by the parser and is considered private.UnaryExpr
(Expression expression, UnaryExpr.Operator operator) UnaryExpr
(TokenRange tokenRange, Expression expression, UnaryExpr.Operator operator) This constructor is used by the parser and is considered private.Constructor parameters in com.github.javaparser.ast.expr with type arguments of type ExpressionModifierConstructorDescriptionArrayInitializerExpr
(NodeList<Expression> values) ArrayInitializerExpr
(TokenRange tokenRange, NodeList<Expression> values) This constructor is used by the parser and is considered private.MethodCallExpr
(Expression scope, SimpleName name, NodeList<Expression> arguments) MethodCallExpr
(Expression scope, String name, NodeList<Expression> arguments) ObjectCreationExpr
(Expression scope, ClassOrInterfaceType type, NodeList<Expression> arguments) Defines a call to a constructor. -
Uses of Expression in com.github.javaparser.ast.nodeTypes
Methods in com.github.javaparser.ast.nodeTypes that return ExpressionModifier and TypeMethodDescriptiondefault Expression
NodeWithArguments.getArgument
(int i) NodeWithCondition.getCondition()
NodeWithExpression.getExpression()
NodeWithScope.getScope()
SwitchNode.getSelector()
Methods in com.github.javaparser.ast.nodeTypes that return types with arguments of type ExpressionModifier and TypeMethodDescriptionNodeWithArguments.getArguments()
NodeWithOptionalScope.getScope()
default Optional
<Expression> NodeWithOptionalScope.traverseScope()
default Optional
<Expression> NodeWithScope.traverseScope()
NodeWithTraversableScope.traverseScope()
Methods in com.github.javaparser.ast.nodeTypes with parameters of type ExpressionModifier and TypeMethodDescriptiondefault ExpressionStmt
NodeWithStatements.addAndGetStatement
(Expression expr) default N
NodeWithArguments.addArgument
(Expression arg) default FieldDeclaration
NodeWithMembers.addFieldWithInitializer
(Type type, String name, Expression initializer, Modifier.Keyword... modifiers) Add a field to this.default FieldDeclaration
NodeWithMembers.addFieldWithInitializer
(Class<?> typeClass, String name, Expression initializer, Modifier.Keyword... modifiers) Add a field to this and automatically add the import of the type if neededdefault FieldDeclaration
NodeWithMembers.addFieldWithInitializer
(String type, String name, Expression initializer, Modifier.Keyword... modifiers) Add a field to this.default N
NodeWithAnnotations.addSingleMemberAnnotation
(Class<? extends Annotation> clazz, Expression expression) Annotates this with a single member annotationdefault N
NodeWithAnnotations.addSingleMemberAnnotation
(String name, Expression expression) Annotates this with a single member annotationdefault N
NodeWithStatements.addStatement
(int index, Expression expr) default N
NodeWithStatements.addStatement
(Expression expr) default int
NodeWithArguments.getArgumentPosition
(Expression argument) default int
NodeWithArguments.getArgumentPosition
(Expression argument, Function<Expression, Expression> converter) default N
NodeWithArguments.setArgument
(int i, Expression arg) NodeWithCondition.setCondition
(Expression condition) NodeWithExpression.setExpression
(Expression expression) NodeWithOptionalScope.setScope
(Expression scope) NodeWithScope.setScope
(Expression scope) SwitchNode.setSelector
(Expression selector) Method parameters in com.github.javaparser.ast.nodeTypes with type arguments of type ExpressionModifier and TypeMethodDescriptiondefault int
NodeWithArguments.getArgumentPosition
(Expression argument, Function<Expression, Expression> converter) default int
NodeWithArguments.getArgumentPosition
(Expression argument, Function<Expression, Expression> converter) NodeWithArguments.setArguments
(NodeList<Expression> arguments) -
Uses of Expression in com.github.javaparser.ast.stmt
Fields in com.github.javaparser.ast.stmt declared as ExpressionModifier and TypeFieldDescriptionprivate Expression
AssertStmt.check
private Expression
ForStmt.compare
private Expression
DoStmt.condition
private Expression
IfStmt.condition
private Expression
WhileStmt.condition
private Expression
ExplicitConstructorInvocationStmt.expression
private Expression
ExpressionStmt.expression
private Expression
ReturnStmt.expression
private Expression
SynchronizedStmt.expression
private Expression
ThrowStmt.expression
private Expression
YieldStmt.expression
private Expression
SwitchEntry.guard
private Expression
ForEachStmt.iterable
private Expression
AssertStmt.message
private Expression
SwitchStmt.selector
Fields in com.github.javaparser.ast.stmt with type parameters of type ExpressionModifier and TypeFieldDescriptionprivate NodeList
<Expression> ExplicitConstructorInvocationStmt.arguments
private NodeList
<Expression> ForStmt.initialization
private NodeList
<Expression> SwitchEntry.labels
private NodeList
<Expression> TryStmt.resources
private NodeList
<Expression> ForStmt.update
Methods in com.github.javaparser.ast.stmt that return ExpressionModifier and TypeMethodDescriptionAssertStmt.getCheck()
DoStmt.getCondition()
IfStmt.getCondition()
WhileStmt.getCondition()
ExpressionStmt.getExpression()
SynchronizedStmt.getExpression()
ThrowStmt.getExpression()
YieldStmt.getExpression()
ForEachStmt.getIterable()
SwitchStmt.getSelector()
Methods in com.github.javaparser.ast.stmt that return types with arguments of type ExpressionModifier and TypeMethodDescriptionExplicitConstructorInvocationStmt.getArguments()
ForStmt.getCompare()
ExplicitConstructorInvocationStmt.getExpression()
ReturnStmt.getExpression()
SwitchEntry.getGuard()
ForStmt.getInitialization()
SwitchEntry.getLabels()
AssertStmt.getMessage()
TryStmt.getResources()
ForStmt.getUpdate()
Methods in com.github.javaparser.ast.stmt with parameters of type ExpressionModifier and TypeMethodDescriptionAssertStmt.setCheck
(Expression check) ForStmt.setCompare
(Expression compare) Sets the compareDoStmt.setCondition
(Expression condition) IfStmt.setCondition
(Expression condition) WhileStmt.setCondition
(Expression condition) ExplicitConstructorInvocationStmt.setExpression
(Expression expression) Sets the expressionExpressionStmt.setExpression
(Expression expression) ReturnStmt.setExpression
(Expression expression) Sets the expressionSynchronizedStmt.setExpression
(Expression expression) ThrowStmt.setExpression
(Expression expression) YieldStmt.setExpression
(Expression expression) Sets the labelSwitchEntry.setGuard
(Expression guard) ForEachStmt.setIterable
(Expression iterable) AssertStmt.setMessage
(Expression message) Sets the messageSwitchStmt.setSelector
(Expression selector) Method parameters in com.github.javaparser.ast.stmt with type arguments of type ExpressionModifier and TypeMethodDescriptionExplicitConstructorInvocationStmt.setArguments
(NodeList<Expression> arguments) ForStmt.setInitialization
(NodeList<Expression> initialization) SwitchEntry.setLabels
(NodeList<Expression> labels) Sets the labelTryStmt.setResources
(NodeList<Expression> resources) ForStmt.setUpdate
(NodeList<Expression> update) Constructors in com.github.javaparser.ast.stmt with parameters of type ExpressionModifierConstructorDescriptionAssertStmt
(Expression check) AssertStmt
(Expression check, Expression message) AssertStmt
(TokenRange tokenRange, Expression check, Expression message) This constructor is used by the parser and is considered private.DoStmt
(Statement body, Expression condition) DoStmt
(TokenRange tokenRange, Statement body, Expression condition) This constructor is used by the parser and is considered private.ExplicitConstructorInvocationStmt
(boolean isThis, Expression expression, NodeList<Expression> arguments) ExplicitConstructorInvocationStmt
(NodeList<Type> typeArguments, boolean isThis, Expression expression, NodeList<Expression> arguments) ExplicitConstructorInvocationStmt
(TokenRange tokenRange, NodeList<Type> typeArguments, boolean isThis, Expression expression, NodeList<Expression> arguments) This constructor is used by the parser and is considered private.ExpressionStmt
(Expression expression) ExpressionStmt
(TokenRange tokenRange, Expression expression) This constructor is used by the parser and is considered private.ForEachStmt
(VariableDeclarationExpr variable, Expression iterable, Statement body) ForEachStmt
(TokenRange tokenRange, VariableDeclarationExpr variable, Expression iterable, Statement body) This constructor is used by the parser and is considered private.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.ReturnStmt
(Expression expression) ReturnStmt
(TokenRange tokenRange, Expression expression) This constructor is used by the parser and is considered private.SwitchEntry
(TokenRange tokenRange, NodeList<Expression> labels, SwitchEntry.Type type, NodeList<Statement> statements, boolean isDefault, Expression guard) This constructor is used by the parser and is considered private.SwitchStmt
(Expression selector, NodeList<SwitchEntry> entries) SwitchStmt
(TokenRange tokenRange, Expression selector, NodeList<SwitchEntry> entries) This constructor is used by the parser and is considered private.SynchronizedStmt
(Expression expression, BlockStmt body) SynchronizedStmt
(TokenRange tokenRange, Expression expression, BlockStmt body) This constructor is used by the parser and is considered private.ThrowStmt
(Expression expression) ThrowStmt
(TokenRange tokenRange, Expression expression) 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.YieldStmt
(Expression expression) YieldStmt
(TokenRange tokenRange, Expression expression) This constructor is used by the parser and is considered private.Constructor parameters in com.github.javaparser.ast.stmt with type arguments of type ExpressionModifierConstructorDescriptionExplicitConstructorInvocationStmt
(boolean isThis, Expression expression, NodeList<Expression> arguments) 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.SwitchEntry
(NodeList<Expression> labels, SwitchEntry.Type type, NodeList<Statement> statements) This constructor exists for backwards compatibility for code that instantiated `SwitchEntries` before the `isDefault` and guard fields were added.SwitchEntry
(NodeList<Expression> labels, SwitchEntry.Type type, NodeList<Statement> statements, boolean isDefault) SwitchEntry
(TokenRange tokenRange, NodeList<Expression> labels, SwitchEntry.Type type, NodeList<Statement> statements) This constructor exists for backwards compatibility for code that instantiated `SwitchEntries` before the `isDefault` and guard fields were added.SwitchEntry
(TokenRange tokenRange, NodeList<Expression> labels, SwitchEntry.Type type, NodeList<Statement> statements, boolean isDefault) This constructor is used by the parser and is considered private.SwitchEntry
(TokenRange tokenRange, NodeList<Expression> labels, SwitchEntry.Type type, NodeList<Statement> statements, boolean isDefault, Expression guard) This constructor is used by the parser and is considered private.TryStmt
(NodeList<Expression> resources, BlockStmt tryBlock, NodeList<CatchClause> catchClauses, BlockStmt finallyBlock) TryStmt
(TokenRange tokenRange, NodeList<Expression> resources, BlockStmt tryBlock, NodeList<CatchClause> catchClauses, BlockStmt finallyBlock) This constructor is used by the parser and is considered private. -
Uses of Expression in com.github.javaparser.printer
Methods in com.github.javaparser.printer with type parameters of type ExpressionModifier and TypeMethodDescriptionprotected <T extends Expression>
voidDefaultPrettyPrinterVisitor.printArguments
(NodeList<T> args, Void arg) protected <T extends Expression>
voidPrettyPrintVisitor.printArguments
(NodeList<T> args, Void arg) Deprecated. -
Uses of Expression in com.github.javaparser.resolution
Methods in com.github.javaparser.resolution with parameters of type ExpressionModifier and TypeMethodDescriptionSymbolResolver.calculateType
(Expression expression) For an expression it would find the corresponding resolved type. -
Uses of Expression in com.github.javaparser.resolution.declarations
Methods in com.github.javaparser.resolution.declarations that return Expression -
Uses of Expression in com.github.javaparser.symbolsolver
Methods in com.github.javaparser.symbolsolver with parameters of type Expression -
Uses of Expression in com.github.javaparser.symbolsolver.javaparsermodel
Methods in com.github.javaparser.symbolsolver.javaparsermodel with parameters of type ExpressionModifier and TypeMethodDescriptionprivate static int
TypeExtractor.getParamPos
(Expression node) SymbolReference
<? extends ResolvedValueDeclaration> JavaParserFacade.solve
(Expression expr) Method parameters in com.github.javaparser.symbolsolver.javaparsermodel with type arguments of type ExpressionModifier and TypeMethodDescriptionprivate void
JavaParserFacade.solveArguments
(Node node, NodeList<Expression> args, boolean solveLambdas, List<ResolvedType> argumentTypes, List<LambdaArgumentTypePlaceholder> placeholders) -
Uses of Expression in com.github.javaparser.symbolsolver.javaparsermodel.contexts
Classes in com.github.javaparser.symbolsolver.javaparsermodel.contexts with type parameters of type ExpressionMethod parameters in com.github.javaparser.symbolsolver.javaparsermodel.contexts with type arguments of type ExpressionModifier and TypeMethodDescriptionprotected Collection
<ResolvedReferenceTypeDeclaration> AbstractJavaParserContext.findTypeDeclarations
(Optional<Expression> optScope) -
Uses of Expression in com.github.javaparser.symbolsolver.javaparsermodel.declarations
Methods in com.github.javaparser.symbolsolver.javaparsermodel.declarations that return Expression -
Uses of Expression in com.github.javaparser.symbolsolver.javassistmodel
Fields in com.github.javaparser.symbolsolver.javassistmodel with type parameters of type ExpressionModifier and TypeFieldDescriptionprivate static Map
<Class<? extends javassist.bytecode.annotation.MemberValue>, Function<javassist.bytecode.annotation.MemberValue, ? extends Expression>> JavassistAnnotationMemberDeclaration.memberValueAsExressionConverter
Methods in com.github.javaparser.symbolsolver.javassistmodel that return Expression -
Uses of Expression in com.github.javaparser.symbolsolver.reflectionmodel
Fields in com.github.javaparser.symbolsolver.reflectionmodel with type parameters of type ExpressionModifier and TypeFieldDescriptionprivate static Map
<Class<?>, Function<Object, ? extends Expression>> ReflectionAnnotationMemberDeclaration.valueAsExpressionConverters
Methods in com.github.javaparser.symbolsolver.reflectionmodel that return ExpressionModifier and TypeMethodDescriptionReflectionAnnotationMemberDeclaration.getDefaultValue()
private Expression
ReflectionAnnotationMemberDeclaration.transformDefaultValue
(Object value) -
Uses of Expression in com.github.javaparser.symbolsolver.resolution.typeinference
Methods in com.github.javaparser.symbolsolver.resolution.typeinference with parameters of type ExpressionModifier and TypeMethodDescriptionstatic boolean
TypeHelper.isCompatibleInALooseInvocationContext
(TypeSolver typeSolver, Expression expression, ResolvedType t) see https://docs.oracle.com/javase/specs/jls/se8/html/jls-5.html#jls-5.3static boolean
TypeHelper.isCompatibleInAStrictInvocationContext
(Expression expression, ResolvedType t) see https://docs.oracle.com/javase/specs/jls/se8/html/jls-5.html#jls-5.3private boolean
TypeInference.isPertinentToApplicability
(Expression argument) Method parameters in com.github.javaparser.symbolsolver.resolution.typeinference with type arguments of type ExpressionModifier and TypeMethodDescriptionTypeInference.instantiationInference
(List<Expression> argumentExpressions, ResolvedMethodDeclaration methodDeclaration) -
Uses of Expression in com.github.javaparser.symbolsolver.resolution.typeinference.constraintformulas
Fields in com.github.javaparser.symbolsolver.resolution.typeinference.constraintformulas declared as ExpressionMethods in com.github.javaparser.symbolsolver.resolution.typeinference.constraintformulas that return types with arguments of type ExpressionModifier and TypeMethodDescriptionprivate List
<Expression> ExpressionCompatibleWithType.getAllReturnExpressions
(BlockStmt blockStmt) private List
<Expression> ExpressionCompatibleWithType.getResultExpressions
(BlockStmt blockStmt) Methods in com.github.javaparser.symbolsolver.resolution.typeinference.constraintformulas with parameters of type ExpressionModifier and TypeMethodDescriptionprivate boolean
ExpressionCompatibleWithType.isCompatibleInAssignmentContext
(Expression expression, ResolvedType type, TypeSolver typeSolver) Constructors in com.github.javaparser.symbolsolver.resolution.typeinference.constraintformulas with parameters of type ExpressionModifierConstructorDescriptionExpressionCompatibleWithType
(TypeSolver typeSolver, Expression expression, ResolvedType T)