Class Expressions
- java.lang.Object
-
- org.apache.calcite.linq4j.tree.Expressions
-
public abstract class Expressions extends java.lang.Object
Utility methods for expressions, including a lot of factory methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Expressions.FluentArrayList<T>
Fluent array list.static interface
Expressions.FluentList<T>
Fluent list.(package private) static interface
Expressions.PropertyInfo
Property info.(package private) static interface
Expressions.RuntimeVariablesExpression
Runtime variables expression.(package private) static interface
Expressions.SymbolDocumentInfo
Symbol document info.
-
Constructor Summary
Constructors Modifier Constructor Description private
Expressions()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static <T extends Expression>
Expressionaccept(T node, Shuttle shuttle)
(package private) static java.util.List<DeclarationStatement>
acceptDeclarations(java.util.List<DeclarationStatement> declarations, Shuttle shuttle)
(package private) static java.util.List<Expression>
acceptExpressions(java.util.List<Expression> expressions, Shuttle shuttle)
(package private) static java.util.List<MemberDeclaration>
acceptMemberDeclarations(java.util.List<MemberDeclaration> memberDeclarations, Shuttle shuttle)
(package private) static <R> R
acceptNodes(java.util.List<? extends Node> nodes, Visitor<R> visitor)
(package private) static java.util.List<Node>
acceptNodes(java.util.List<Node> nodes, Shuttle shuttle)
(package private) static java.util.List<Expression>
acceptParameterExpressions(java.util.List<ParameterExpression> parameterExpressions, Shuttle shuttle)
(package private) static java.util.List<Statement>
acceptStatements(java.util.List<Statement> statements, Shuttle shuttle)
static BinaryExpression
add(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic addition operation that does not have overflow checking.static BinaryExpression
add(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic addition operation that does not have overflow checking.static BinaryExpression
addAssign(Expression left, Expression right)
Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.static BinaryExpression
addAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.static BinaryExpression
addAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaLeft, LambdaExpression lambdaRight)
Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.static BinaryExpression
addAssignChecked(Expression left, Expression right)
Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.static BinaryExpression
addAssignChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.static BinaryExpression
addAssignChecked(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.static BinaryExpression
addChecked(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic addition operation that has overflow checking.static BinaryExpression
addChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic addition operation that has overflow checking.static BinaryExpression
and(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise AND operation.static BinaryExpression
and(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise AND operation.static BinaryExpression
andAlso(Expression left, Expression right)
Creates a BinaryExpression that represents a conditional AND operation that evaluates the second operand only if the first operand evaluates to true.static BinaryExpression
andAlso(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a conditional AND operation that evaluates the second operand only if the first operand is resolved to true.static BinaryExpression
andAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise AND assignment operation.static BinaryExpression
andAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise AND assignment operation.static BinaryExpression
andAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a bitwise AND assignment operation.static IndexExpression
arrayIndex(Expression array, Expression indexExpression)
Creates an expression that represents applying an array index operator to an array of rank one.static UnaryExpression
arrayLength(Expression array)
Creates a UnaryExpression that represents an expression for obtaining the length of a one-dimensional array.static BinaryExpression
assign(Expression left, Expression right)
Creates a BinaryExpression that represents an assignment operation.static MemberAssignment
bind(java.lang.reflect.Member member, Expression right)
Creates a MemberAssignment that represents the initialization of a field or property.static MemberAssignment
bind(java.lang.reflect.Method method, Expression expression)
Creates a MemberAssignment that represents the initialization of a member by using a property accessor method.static BlockStatement
block(java.lang.Iterable<? extends Statement> statements)
Creates a BlockExpression that contains the given statements.static BlockStatement
block(java.lang.reflect.Type type, java.lang.Iterable<? extends Statement> expressions)
Creates a BlockExpression that contains the given expressions, has no variables and has specific result type.static BlockStatement
block(java.lang.reflect.Type type, Statement... statements)
Creates a BlockExpression that contains the given statements and has a specific result type, using varargs.static BlockStatement
block(Statement... statements)
Creates a BlockExpression that contains the given statements, using varargs.private static java.lang.reflect.Type
box(java.lang.reflect.Type type)
static Expression
box(Expression expression)
Converts e.g.static Expression
box(Expression expression, Primitive primitive)
Returns an expression to box the value of a primitive expression.static GotoStatement
break_(LabelTarget labelTarget)
Creates a GotoExpression representing a break statement.static GotoStatement
break_(LabelTarget labelTarget, java.lang.reflect.Type type)
Creates a GotoExpression representing a break statement with the specified type.static GotoStatement
break_(LabelTarget labelTarget, Expression expression)
Creates a GotoExpression representing a break statement.static GotoStatement
break_(LabelTarget labelTarget, Expression expression, java.lang.reflect.Type type)
Creates a GotoExpression representing a break statement with the specified type.static MethodCallExpression
call(java.lang.reflect.Method method, java.lang.Iterable<? extends Expression> arguments)
Creates a MethodCallExpression that represents a call to a static method that has arguments.static MethodCallExpression
call(java.lang.reflect.Method method, Expression... arguments)
Creates a MethodCallExpression that represents a call to a static method that has arguments, using varargs.static MethodCallExpression
call(java.lang.reflect.Type type, java.lang.String methodName, java.lang.Iterable<? extends Expression> arguments)
Creates a MethodCallExpression that represents a call to a static method by calling the appropriate factory method.static MethodCallExpression
call(java.lang.reflect.Type type, java.lang.String methodName, Expression... arguments)
Creates a MethodCallExpression that represents a call to a static method by calling the appropriate factory method, using varargs.static MethodCallExpression
call(java.lang.reflect.Type returnType, Expression expression, java.lang.reflect.Method method, java.lang.Iterable<? extends Expression> arguments)
Creates a MethodCallExpression that represents a call to a method that takes arguments, with an explicit return type.static MethodCallExpression
call(java.lang.reflect.Type returnType, Expression expression, java.lang.reflect.Method method, Expression... arguments)
Creates a MethodCallExpression that represents a call to a method that takes arguments, with an explicit return type, with varargs.static MethodCallExpression
call(Expression expression, java.lang.reflect.Method method, java.lang.Iterable<? extends Expression> arguments)
Creates a MethodCallExpression that represents a call to a method that takes arguments.static MethodCallExpression
call(Expression expression, java.lang.reflect.Method method, Expression... arguments)
Creates a MethodCallExpression that represents a call to a method that takes arguments, using varargs.static MethodCallExpression
call(Expression target, java.lang.String methodName, java.lang.Iterable<? extends Expression> arguments)
Creates a MethodCallExpression that represents a call to an instance method by calling the appropriate factory method.static MethodCallExpression
call(Expression target, java.lang.String methodName, Expression... arguments)
Creates a MethodCallExpression that represents a call to an instance method by calling the appropriate factory method, using varargs.static CatchBlock
catch_(ParameterExpression parameter, Statement statement)
Creates a CatchBlock representing a catch statement with a reference to the caught Exception object for use in the handler body.static ClassDeclaration
classDecl(int modifier, java.lang.String name, java.lang.reflect.Type extended, java.util.List<java.lang.reflect.Type> implemented, java.util.List<MemberDeclaration> memberDeclarations)
Declares a class.static void
clearDebugInfo()
Creates a DebugInfoExpression for clearing a sequence point.static BinaryExpression
coalesce(Expression left, Expression right)
Creates a BinaryExpression that represents a coalescing operation.static BinaryExpression
coalesce(Expression left, Expression right, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a coalescing operation, given a conversion function.static Expression
condition(Expression test, Expression ifTrue, Expression ifFalse)
Creates a ConditionalExpression that represents a conditional statement.static ConditionalExpression
condition(Expression test, Expression ifTrue, Expression ifFalse, java.lang.reflect.Type type)
Creates a ConditionalExpression that represents a conditional statement.static ConstantExpression
constant(java.lang.Object value)
Creates a ConstantExpression that has the Value property set to the specified value.static ConstantExpression
constant(java.lang.Object value, java.lang.reflect.Type type)
Creates a ConstantExpression that has the Value and Type properties set to the specified values.static ConstructorDeclaration
constructorDecl(int modifier, java.lang.reflect.Type declaredAgainst, java.lang.Iterable<? extends ParameterExpression> parameters, BlockStatement body)
Declares a constructor.static GotoStatement
continue_(LabelTarget labelTarget)
Creates a GotoExpression representing a continue statement.static GotoStatement
continue_(LabelTarget labelTarget, java.lang.reflect.Type type)
Creates a GotoExpression representing a continue statement with the specified type.static UnaryExpression
convert_(Expression expression, java.lang.reflect.Type type)
Creates a UnaryExpression that represents a type conversion operation.static UnaryExpression
convert_(Expression expression, java.lang.reflect.Type type, java.lang.reflect.Method method)
Creates a UnaryExpression that represents a conversion operation for which the implementing method is specified.static UnaryExpression
convertChecked(Expression expression, java.lang.reflect.Type type)
Creates a UnaryExpression that represents a conversion operation that throws an exception if the target type is overflowed.static UnaryExpression
convertChecked_(Expression expression, java.lang.reflect.Type type, java.lang.reflect.Method method)
Creates a UnaryExpression that represents a conversion operation that throws an exception if the target type is overflowed and for which the implementing method is specified.static void
debugInfo()
Creates a DebugInfoExpression with the specified span.static DeclarationStatement
declare(int modifiers, java.lang.String name, Expression initializer)
Creates an expression that declares and initializes a variable.static DeclarationStatement
declare(int modifiers, ParameterExpression parameter, Expression initializer)
Creates a statement that declares a variable.static UnaryExpression
decrement(Expression expression)
Creates a UnaryExpression that represents the decrementing of the expression by 1.static UnaryExpression
decrement(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents the decrementing of the expression by 1.private static java.lang.Class
deduceType(java.util.List<ParameterExpression> parameterList, java.lang.reflect.Type type)
static DefaultExpression
default_()
Creates a DefaultExpression that has the Type property set to the specified type.static BinaryExpression
divide(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic division operation.static BinaryExpression
divide(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic division operation.static BinaryExpression
divideAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.static BinaryExpression
divideAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.static BinaryExpression
divideAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.static DynamicExpression
dynamic(CallSiteBinder binder, java.lang.reflect.Type type, java.lang.Iterable<? extends Expression> expressions)
Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.static DynamicExpression
dynamic(CallSiteBinder binder, java.lang.reflect.Type type, Expression... expression)
Creates aDynamicExpression
that represents a dynamic operation bound by the providedCallSiteBinder
, using varargs.static ElementInit
elementInit(java.lang.reflect.Method method, java.lang.Iterable<? extends Expression> expressions)
Creates anElementInit
, given anIterable<T>
as the second argument.static ElementInit
elementInit(java.lang.reflect.Method method, Expression... expressions)
Creates an ElementInit, given an array of values as the second argument, using varargs.static DefaultExpression
empty()
Creates an empty expression that has Void type.static BinaryExpression
equal(Expression left, Expression right)
Creates a BinaryExpression that represents an equality comparison.static BinaryExpression
equal(Expression expression0, Expression expression1, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an equality comparison.static BinaryExpression
exclusiveOr(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise XOR operation, using op_ExclusiveOr for user-defined types.static BinaryExpression
exclusiveOr(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise XOR operation, using op_ExclusiveOr for user-defined types.static BinaryExpression
exclusiveOrAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.static BinaryExpression
exclusiveOrAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.static BinaryExpression
exclusiveOrAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.static MemberExpression
field(Expression expression, java.lang.reflect.Field field)
Creates a MemberExpression that represents accessing a field.static MemberExpression
field(Expression expression, java.lang.reflect.Type type, java.lang.String fieldName)
Creates a MemberExpression that represents accessing a field.static MemberExpression
field(Expression expression, java.lang.String fieldName)
Creates a MemberExpression that represents accessing a field given the name of the field.static MemberExpression
field(Expression expression, PseudoField field)
Creates a MemberExpression that represents accessing a field.static FieldDeclaration
fieldDecl(int modifier, ParameterExpression parameter)
Declares a field.static FieldDeclaration
fieldDecl(int modifier, ParameterExpression parameter, Expression initializer)
Declares a field with an initializer.static Expression
foldAnd(java.util.List<Expression> conditions)
Combines a list of expressions using AND.static Expression
foldOr(java.util.List<Expression> conditions)
Combines a list of expressions using OR.static ForStatement
for_(java.lang.Iterable<? extends DeclarationStatement> declarations, Expression condition, Expression post, Statement body)
Creates a LoopExpression with the given body.static ForStatement
for_(DeclarationStatement declaration, Expression condition, Expression post, Statement body)
Creates a LoopExpression with the given body.static java.lang.Class
getActionType(java.lang.Class... typeArgs)
Creates a Type object that represents a generic System.Action delegate type that has specific type arguments.static java.lang.Class
getDelegateType(java.lang.Class... typeArgs)
Gets a Type object that represents a generic System.Func or System.Action delegate type that has specific type arguments.static java.lang.Class
getFuncType(java.lang.Class... typeArgs)
Creates a Type object that represents a generic System.Func delegate type that has specific type arguments.static GotoStatement
goto_(LabelTarget labelTarget)
Creates a GotoExpression representing a "go to" statement.static GotoStatement
goto_(LabelTarget labelTarget, java.lang.reflect.Type type)
Creates a GotoExpression representing a "go to" statement with the specified type.static GotoStatement
goto_(LabelTarget labelTarget, Expression expression)
Creates a GotoExpression representing a "go to" statement.static GotoStatement
goto_(LabelTarget labelTarget, Expression expression, java.lang.reflect.Type type)
Creates a GotoExpression representing a "go to" statement with the specified type.static BinaryExpression
greaterThan(Expression left, Expression right)
Creates a BinaryExpression that represents a "greater than" numeric comparison.static BinaryExpression
greaterThan(Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a "greater than" numeric comparison.static BinaryExpression
greaterThanOrEqual(Expression left, Expression right)
Creates a BinaryExpression that represents a "greater than or equal" numeric comparison.static BinaryExpression
greaterThanOrEqual(Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a "greater than or equal" numeric comparison.static ConditionalStatement
ifThen(Expression test, Node ifTrue)
Creates a ConditionalExpression that represents a conditional block with an if statement.static ConditionalStatement
ifThenElse(java.lang.Iterable<? extends Node> nodes)
Creates a ConditionalExpression that represents a conditional block with if and else statements:if (test) stmt1 [ else if (test2) stmt2 ]...
static ConditionalStatement
ifThenElse(Expression test, Node... nodes)
Creates a ConditionalExpression that represents a conditional block with if and else statements:if (test) stmt1 [ else if (test2) stmt2 ]...
static ConditionalStatement
ifThenElse(Expression test, Node ifTrue, Node ifFalse)
Creates a ConditionalExpression that represents a conditional block with if and else statements.static UnaryExpression
increment(Expression expression)
Creates a UnaryExpression that represents the incrementing of the expression value by 1.static UnaryExpression
increment(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents the incrementing of the expression by 1.static InvocationExpression
invoke(Expression expression, java.lang.Iterable<? extends Expression> arguments)
Creates an InvocationExpression that applies a delegate or lambda expression to a list of argument expressions.static InvocationExpression
invoke(Expression expression, Expression... arguments)
Creates an InvocationExpression that applies a delegate or lambda expression to a list of argument expressions, using varargs.static boolean
isConstantNull(Expression e)
Returns whether an expression always evaluates to null.static UnaryExpression
isFalse(Expression expression)
Returns whether the expression evaluates to false.static UnaryExpression
isFalse(Expression expression, java.lang.reflect.Method method)
Returns whether the expression evaluates to false.static UnaryExpression
isTrue(Expression expression)
Returns whether the expression evaluates to true.static UnaryExpression
isTrue(Expression expression, java.lang.reflect.Method method)
Returns whether the expression evaluates to true.static LabelTarget
label()
Creates a LabelTarget representing a label with X type and no name.static LabelTarget
label(java.lang.reflect.Type type)
Creates a LabelTarget representing a label with the given type.static LabelTarget
label(java.lang.reflect.Type type, java.lang.String name)
Creates a LabelTarget representing a label with the given type and name.static LabelTarget
label(java.lang.String name)
Creates a LabelTarget representing a label with X type and the given name.static LabelStatement
label(LabelTarget labelTarget)
Creates a LabelExpression representing a label without a default value.static LabelStatement
label(LabelTarget labelTarget, Expression expression)
Creates a LabelExpression representing a label with the given default value.static <F extends Function<?>>
FunctionExpression<F>lambda(F function)
Creates a FunctionExpression from an actual function.static <T,F extends Function<? extends T>>
FunctionExpression<F>lambda(java.lang.Class<F> type, BlockStatement body, java.lang.Iterable<? extends ParameterExpression> parameters)
Creates a LambdaExpression by first constructing a delegate type.static <T,F extends Function<? extends T>>
FunctionExpression<F>lambda(java.lang.Class<F> type, BlockStatement body, ParameterExpression... parameters)
Creates a LambdaExpression by first constructing a delegate type, using varargs.static <T,F extends Function<? extends T>>
FunctionExpression<F>lambda(java.lang.Class<F> type, Expression body, java.lang.Iterable<? extends ParameterExpression> parameters)
Creates a LambdaExpression by first constructing a delegate type.static <T,F extends Function<? extends T>>
FunctionExpression<F>lambda(java.lang.Class<F> type, Expression body, ParameterExpression... parameters)
Creates a LambdaExpression by first constructing a delegate type, using varargs.static <F extends Function<?>>
FunctionExpression<F>lambda(BlockStatement body, java.lang.Iterable<? extends ParameterExpression> parameters)
Creates a LambdaExpression by first constructing a delegate type.static <F extends Function<?>>
FunctionExpression<F>lambda(BlockStatement body, ParameterExpression... parameters)
Creates a LambdaExpression by first constructing a delegate type, using varargs.static <F extends Function<?>>
FunctionExpression<F>lambda(Expression body, java.lang.Iterable<? extends ParameterExpression> parameters)
Creates an Expression where the delegate typeF
is known at compile time.static <F extends Function<?>>
FunctionExpression<F>lambda(Expression body, ParameterExpression... parameters)
Creates an Expression where the delegate typeF
is known at compile time, using varargs.private static java.lang.reflect.Type
larger(java.lang.reflect.Type type0, java.lang.reflect.Type type1)
private java.lang.reflect.Type
largest(java.lang.reflect.Type... types)
static BinaryExpression
leftShift(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise left-shift operation.static BinaryExpression
leftShift(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise left-shift operation.static BinaryExpression
leftShiftAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise left-shift assignment operation.static BinaryExpression
leftShiftAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise left-shift assignment operation.static BinaryExpression
leftShiftAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a bitwise left-shift assignment operation.static BinaryExpression
lessThan(Expression left, Expression right)
Creates a BinaryExpression that represents a "less than" numeric comparison.static BinaryExpression
lessThan(Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a "less than" numeric comparison.static BinaryExpression
lessThanOrEqual(Expression left, Expression right)
Creates a BinaryExpression that represents a " less than or equal" numeric comparison.static BinaryExpression
lessThanOrEqual(Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a "less than or equal" numeric comparison.static <T> Expressions.FluentList<T>
list()
Creates an empty fluent list.static <T> Expressions.FluentList<T>
list(java.lang.Iterable<T> ts)
Creates a fluent list with elements from the given collection.static <T> Expressions.FluentList<T>
list(T... ts)
Creates a fluent list with given elements.static MemberListBinding
listBind(java.lang.reflect.Member member, java.lang.Iterable<? extends ElementInit> elementInits)
Creates a MemberListBinding where the member is a field or property.static MemberListBinding
listBind(java.lang.reflect.Member member, ElementInit... elementInits)
Creates a MemberListBinding where the member is a field or property, using varargs.static MemberListBinding
listBind(java.lang.reflect.Method method, java.lang.Iterable<? extends ElementInit> elementInits)
Creates a MemberListBinding based on a specified property accessor method.static MemberListBinding
listBind(java.lang.reflect.Method method, ElementInit... elementInits)
Creates a MemberListBinding object based on a specified property accessor method, using varargs.static ListInitExpression
listInit(NewExpression newExpression, java.lang.Iterable<? extends ElementInit> elementInits)
Creates a ListInitExpression that uses specified ElementInit objects to initialize a collection.static ListInitExpression
listInit(NewExpression newExpression, java.lang.reflect.Method method, java.lang.Iterable<? extends Expression> arguments)
Creates a ListInitExpression that uses a specified method to add elements to a collection.static ListInitExpression
listInit(NewExpression newExpression, java.lang.reflect.Method method, Expression... arguments)
Creates a ListInitExpression that uses a specified method to add elements to a collection, using varargs.static ListInitExpression
listInit(NewExpression newExpression, ElementInit... elementInits)
Creates a ListInitExpression that uses specified ElementInit objects to initialize a collection, using varargs.static ListInitExpression
listInit(NewExpression newExpression, Expression... arguments)
Creates a ListInitExpression that uses a method named "Add" to add elements to a collection, using varargs.static ListInitExpression
listInitE(NewExpression newExpression, java.lang.Iterable<? extends Expression> arguments)
Creates a ListInitExpression that uses a method named "Add" to add elements to a collection.static BinaryExpression
makeBinary(ExpressionType binaryType, Expression left, Expression right)
Creates a BinaryExpression, given the left and right operands, by calling an appropriate factory method.static BinaryExpression
makeBinary(ExpressionType binaryType, Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression, given the left operand, right operand and implementing method, by calling the appropriate factory method.static BinaryExpression
makeBinary(ExpressionType binaryType, Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression, given the left operand, right operand, implementing method and type conversion function, by calling the appropriate factory method.static CatchBlock
makeCatchBlock(java.lang.reflect.Type type, ParameterExpression variable, Expression body, Expression filter)
Creates a CatchBlock representing a catch statement with the specified elements.static DynamicExpression
makeDynamic(java.lang.reflect.Type type, CallSiteBinder binder, java.lang.Iterable<? extends Expression> arguments)
Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.static DynamicExpression
makeDynamic(java.lang.reflect.Type type, CallSiteBinder binder, Expression... arguments)
Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder, using varargs.static GotoStatement
makeGoto(GotoExpressionKind kind, LabelTarget labelTarget, Expression expression)
static GotoStatement
makeGoto(GotoExpressionKind kind, LabelTarget target, Expression value, java.lang.reflect.Type type)
Creates a GotoExpression representing a jump of the specified GotoExpressionKind.static MemberExpression
makeMemberAccess(Expression expression, PseudoField member)
Creates a MemberExpression that represents accessing a field.static TernaryExpression
makeTernary(ExpressionType ternaryType, Expression e0, Expression e1, Expression e2)
Creates a TernaryExpression, given the left and right operands, by calling an appropriate factory method.static TryStatement
makeTry(java.lang.reflect.Type type, Expression body, Expression finally_, Expression fault, java.lang.Iterable<? extends CatchBlock> handlers)
Creates a TryExpression representing a try block with the specified elements.static TryStatement
makeTry(java.lang.reflect.Type type, Expression body, Expression finally_, Expression fault, CatchBlock... handlers)
Creates a TryExpression representing a try block with the specified elements, using varargs.static UnaryExpression
makeUnary(ExpressionType expressionType, Expression expression)
Creates a UnaryExpression, given an operand, by calling the appropriate factory method.static UnaryExpression
makeUnary(ExpressionType expressionType, Expression expression, java.lang.reflect.Type type, java.lang.reflect.Method method)
Creates a UnaryExpression, given an operand and implementing method, by calling the appropriate factory method.static MemberMemberBinding
memberBind(java.lang.reflect.Member member, java.lang.Iterable<? extends MemberBinding> bindings)
Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property.static MemberMemberBinding
memberBind(java.lang.reflect.Member member, MemberBinding... bindings)
Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property, using varargs.static MemberMemberBinding
memberBind(java.lang.reflect.Method method, java.lang.Iterable<? extends MemberBinding> bindings)
Creates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method.static MemberMemberBinding
memberBind(java.lang.reflect.Method method, MemberBinding... bindings)
Creates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method, using varargs.static MemberInitExpression
memberInit(NewExpression newExpression, java.lang.Iterable<? extends MemberBinding> bindings)
Represents an expression that creates a new object and initializes a property of the object.static MemberInitExpression
memberInit(NewExpression newExpression, MemberBinding... bindings)
Represents an expression that creates a new object and initializes a property of the object, using varargs.static MethodDeclaration
methodDecl(int modifier, java.lang.reflect.Type resultType, java.lang.String name, java.lang.Iterable<? extends ParameterExpression> parameters, BlockStatement body)
Declares a method.static BinaryExpression
modulo(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic remainder operation.static BinaryExpression
modulo(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic remainder operation.static BinaryExpression
moduloAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a remainder assignment operation.static BinaryExpression
moduloAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a remainder assignment operation.static BinaryExpression
moduloAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a remainder assignment operation.static BinaryExpression
multiply(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic multiplication operation that does not have overflow checking.static BinaryExpression
multiply(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic multiplication operation that does not have overflow checking.static BinaryExpression
multiplyAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.static BinaryExpression
multiplyAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.static BinaryExpression
multiplyAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.static BinaryExpression
multiplyAssignChecked(Expression left, Expression right)
Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.static BinaryExpression
multiplyAssignChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.static BinaryExpression
multiplyAssignChecked(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.static BinaryExpression
multiplyChecked(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic multiplication operation that has overflow checking.static BinaryExpression
multiplyChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic multiplication operation that has overflow checking.static UnaryExpression
negate(Expression expression)
Creates a UnaryExpression that represents an arithmetic negation operation.static UnaryExpression
negate(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents an arithmetic negation operation.static UnaryExpression
negateChecked(Expression expression)
Creates a UnaryExpression that represents an arithmetic negation operation that has overflow checking.static UnaryExpression
negateChecked(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents an arithmetic negation operation that has overflow checking.static NewExpression
new_(java.lang.reflect.Constructor constructor)
Creates a NewExpression that represents calling the specified constructor that takes no arguments.static NewExpression
new_(java.lang.reflect.Constructor constructor, java.lang.Iterable<? extends Expression> expressions)
Creates a NewExpression that represents calling the specified constructor with the specified arguments.static NewExpression
new_(java.lang.reflect.Constructor constructor, java.lang.Iterable<? extends Expression> expressions, java.lang.Iterable<? extends MemberDeclaration> memberDeclarations)
Creates a NewExpression that represents calling the specified constructor with the specified arguments.static NewExpression
new_(java.lang.reflect.Constructor constructor, java.lang.Iterable<? extends Expression> expressions, MemberDeclaration... memberDeclarations)
Creates a NewExpression that represents calling the specified constructor with the specified arguments, using varargs.static NewExpression
new_(java.lang.reflect.Constructor constructor, Expression... expressions)
Creates a NewExpression that represents calling the specified constructor with the specified arguments, using varargs.static NewExpression
new_(java.lang.reflect.Type type)
Creates a NewExpression that represents calling the parameterless constructor of the specified type.static NewExpression
new_(java.lang.reflect.Type type, java.lang.Iterable<? extends Expression> arguments)
Creates a NewExpression that represents calling the constructor of the specified type whose parameters are assignable from the specified arguments.static NewExpression
new_(java.lang.reflect.Type type, java.lang.Iterable<? extends Expression> arguments, java.lang.Iterable<? extends MemberDeclaration> memberDeclarations)
Creates a NewExpression that represents calling the constructor of the specified type whose parameters are assignable from the specified arguments.static NewExpression
new_(java.lang.reflect.Type type, java.lang.Iterable<? extends Expression> arguments, MemberDeclaration... memberDeclarations)
Creates a NewExpression that represents calling the constructor of the specified type whose parameters are assignable from the specified arguments, using varargs.static NewExpression
new_(java.lang.reflect.Type type, Expression... arguments)
Creates a NewExpression that represents calling the constructor of the specified type whose parameters are assignable from the specified arguments, using varargs.static NewArrayExpression
newArrayBounds(java.lang.reflect.Type type, int dimension, Expression bound)
Creates a NewArrayExpression that represents creating an array that has a specified rank.static NewArrayExpression
newArrayInit(java.lang.reflect.Type type, int dimension, java.lang.Iterable<? extends Expression> expressions)
Creates a NewArrayExpression that represents creating a n-dimensional array and initializing it from a list of elements.static NewArrayExpression
newArrayInit(java.lang.reflect.Type type, int dimension, Expression... expressions)
Creates a NewArrayExpression that represents creating an n-dimensional array and initializing it from a list of elements, using varargs.static NewArrayExpression
newArrayInit(java.lang.reflect.Type type, java.lang.Iterable<? extends Expression> expressions)
Creates a NewArrayExpression that represents creating a one-dimensional array and initializing it from a list of elements.static NewArrayExpression
newArrayInit(java.lang.reflect.Type type, Expression... expressions)
Creates a NewArrayExpression that represents creating a one-dimensional array and initializing it from a list of elements, using varargs.static UnaryExpression
not(Expression expression)
Creates a UnaryExpression that represents a bitwise complement operation.static UnaryExpression
not(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents a bitwise complement operation.static BinaryExpression
notEqual(Expression left, Expression right)
Creates a BinaryExpression that represents an inequality comparison.static BinaryExpression
notEqual(Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an inequality comparison.static UnaryExpression
onesComplement(Expression expression)
Returns the expression representing the ones complement.static UnaryExpression
onesComplement(Expression expression, java.lang.reflect.Method method)
Returns the expression representing the ones complement.static BinaryExpression
or(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise OR operation.static BinaryExpression
or(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise OR operation.static BinaryExpression
orAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise OR assignment operation.static BinaryExpression
orAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise OR assignment operation.static BinaryExpression
orAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a bitwise OR assignment operation.static BinaryExpression
orElse(Expression left, Expression right)
Creates a BinaryExpression that represents a conditional OR operation that evaluates the second operand only if the first operand evaluates to false.static BinaryExpression
orElse(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a conditional OR operation that evaluates the second operand only if the first operand evaluates to false.static ParameterExpression
parameter(int modifiers, java.lang.reflect.Type type, java.lang.String name)
Creates a ParameterExpression.static ParameterExpression
parameter(java.lang.reflect.Type type)
Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.static ParameterExpression
parameter(java.lang.reflect.Type type, java.lang.String name)
Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.static UnaryExpression
postDecrementAssign(Expression expression)
Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent decrement by 1 of the original expression.static UnaryExpression
postDecrementAssign(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent decrement by 1 of the original expression.static UnaryExpression
postIncrementAssign(Expression expression)
Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent increment by 1 of the original expression.static UnaryExpression
postIncrementAssign(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent increment by 1 of the original expression.static BinaryExpression
power(Expression left, Expression right)
Creates a BinaryExpression that represents raising a number to a power.static BinaryExpression
power(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents raising a number to a power.static BinaryExpression
powerAssign(Expression left, Expression right)
Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.static BinaryExpression
powerAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.static BinaryExpression
powerAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.static UnaryExpression
preDecrementAssign(Expression expression)
Creates a UnaryExpression that decrements the expression by 1 and assigns the result back to the expression.static UnaryExpression
preDecrementAssign(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that decrements the expression by 1 and assigns the result back to the expression.static UnaryExpression
preIncrementAssign(Expression expression)
Creates a UnaryExpression that increments the expression by 1 and assigns the result back to the expression.static UnaryExpression
preIncrementAssign(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that increments the expression by 1 and assigns the result back to the expression.static MemberExpression
property(Expression expression, java.lang.reflect.Method method)
Creates a MemberExpression that represents accessing a property by using a property accessor method.static MemberExpression
property(Expression expression, java.lang.reflect.Type type, java.lang.String name)
Creates a MemberExpression accessing a property.static MemberExpression
property(Expression expression, java.lang.String name)
Creates a MemberExpression that represents accessing a property.static IndexExpression
property(Expression expression, java.lang.String name, Expression... arguments)
Creates an IndexExpression representing the access to an indexed property.static MemberExpression
property(Expression expression, Expressions.PropertyInfo property)
Creates a MemberExpression that represents accessing a property.static IndexExpression
property(Expression expression, Expressions.PropertyInfo property, java.lang.Iterable<? extends Expression> arguments)
Creates an IndexExpression representing the access to an indexed property.static IndexExpression
property(Expression expression, Expressions.PropertyInfo property, Expression... arguments)
Creates an IndexExpression representing the access to an indexed property, using varargs.static MemberExpression
propertyOrField(Expression expression, java.lang.String propertyOfFieldName)
Creates a MemberExpression that represents accessing a property or field.static UnaryExpression
quote(Expression expression)
Creates a UnaryExpression that represents an expression that has a constant value of type Expression.static Expression
reduce(Expression expression)
Reduces this node to a simpler expression.static Expression
reduceAndCheck(Expression expression)
Reduces this node to a simpler expression.static Expression
reduceExtensions(Expression expression)
Reduces the expression to a known node type (that is not an Extension node) or just returns the expression if it is already a known type.static Expression
referenceEqual(Expression left, Expression right)
Creates a BinaryExpression that represents a reference equality comparison.static Expression
referenceNotEqual(Expression left, Expression right)
Creates a BinaryExpression that represents a reference inequality comparison.static UnaryExpression
rethrow()
Creates a UnaryExpression that represents a rethrowing of an exception.static UnaryExpression
rethrow(java.lang.reflect.Type type)
Creates a UnaryExpression that represents a rethrowing of an exception with a given type.static GotoStatement
return_(LabelTarget labelTarget)
Creates a GotoExpression representing a return statement.static GotoStatement
return_(LabelTarget labelTarget, java.lang.reflect.Type type)
Creates a GotoExpression representing a return statement with the specified type.static GotoStatement
return_(LabelTarget labelTarget, Expression expression)
Creates a GotoExpression representing a return statement.static GotoStatement
return_(LabelTarget labelTarget, Expression expression, java.lang.reflect.Type type)
Creates a GotoExpression representing a return statement with the specified type.static BinaryExpression
rightShift(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise right-shift operation.static BinaryExpression
rightShift(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise right-shift operation.static BinaryExpression
rightShiftAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise right-shift assignment operation.static BinaryExpression
rightShiftAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise right-shift assignment operation.static BinaryExpression
rightShiftAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a bitwise right-shift assignment operation.static Expressions.RuntimeVariablesExpression
runtimeVariables(java.lang.Iterable<? extends ParameterExpression> expressions)
Creates an instance of RuntimeVariablesExpression.static Expressions.RuntimeVariablesExpression
runtimeVariables(ParameterExpression... arguments)
Creates an instance of RuntimeVariablesExpression, using varargs.private static boolean
shouldLift(Expression left, Expression right, java.lang.reflect.Method method)
static Statement
statement(Expression expression)
Creates a statement that executes an expression.static BinaryExpression
subtract(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic subtraction operation that does not have overflow checking.static BinaryExpression
subtract(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic subtraction operation that does not have overflow checking.static BinaryExpression
subtractAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.static BinaryExpression
subtractAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.static BinaryExpression
subtractAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.static BinaryExpression
subtractAssignChecked(Expression left, Expression right)
Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.static BinaryExpression
subtractAssignChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.static BinaryExpression
subtractAssignChecked(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.static BinaryExpression
subtractChecked(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic subtraction operation that has overflow checking.static BinaryExpression
subtractChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic subtraction operation that has overflow checking.static SwitchStatement
switch_(java.lang.reflect.Type type, Expression switchValue, Expression defaultBody, java.lang.reflect.Method method, java.lang.Iterable<? extends SwitchCase> cases)
Creates a SwitchExpression that represents a switch statement that has a default case.static SwitchStatement
switch_(java.lang.reflect.Type type, Expression switchValue, Expression defaultBody, java.lang.reflect.Method method, SwitchCase... cases)
Creates a SwitchExpression that represents a switch statement that has a default case, using varargs.static SwitchStatement
switch_(Expression switchValue, Expression defaultBody, java.lang.reflect.Method method, java.lang.Iterable<? extends SwitchCase> cases)
Creates a SwitchExpression that represents a switch statement that has a default case.static SwitchStatement
switch_(Expression switchValue, Expression defaultBody, java.lang.reflect.Method method, SwitchCase... cases)
Creates a SwitchExpression that represents a switch statement that has a default case, using varargs.static SwitchStatement
switch_(Expression switchValue, Expression defaultBody, SwitchCase... cases)
Creates a SwitchExpression that represents a switch statement that has a default case.static SwitchStatement
switch_(Expression switchValue, SwitchCase... cases)
Creates a SwitchExpression that represents a switch statement without a default case.static SwitchCase
switchCase(Expression expression, java.lang.Iterable<? extends Expression> body)
Creates a SwitchCase for use in a SwitchExpression.static SwitchCase
switchCase(Expression expression, Expression... body)
Creates a SwitchCase for use in a SwitchExpression, with varargs.static Expressions.SymbolDocumentInfo
symbolDocument(java.lang.String fileName)
Creates an instance of SymbolDocumentInfo.static Expressions.SymbolDocumentInfo
symbolDocument(java.lang.String fileName, java.util.UUID language)
Creates an instance of SymbolDocumentInfo.static Expressions.SymbolDocumentInfo
symbolDocument(java.lang.String fileName, java.util.UUID language, java.util.UUID vendor)
Creates an instance of SymbolDocumentInfo.static Expressions.SymbolDocumentInfo
symbolDocument(java.lang.String filename, java.util.UUID language, java.util.UUID vendor, java.util.UUID documentType)
Creates an instance of SymbolDocumentInfo.static ThrowStatement
throw_(Expression expression)
Creates a statement that represents the throwing of an exception.private static <T> T[]
toArray(java.lang.Iterable<T> iterable, T[] a)
private static <T> java.util.Collection<T>
toCollection(java.lang.Iterable<T> iterable)
private static <T> java.util.List<T>
toList(java.lang.Iterable<? extends T> iterable)
private static <T> java.util.List<T>
toList(T[] ts)
static java.lang.String
toString(java.util.List<? extends Node> expressions, java.lang.String sep, boolean generics)
Converts a list of expressions to Java source code, optionally emitting extra type information in generics.static java.lang.String
toString(Node expression)
Converts an expression to Java source code.static TryStatement
tryCatch(Statement body, java.lang.Iterable<? extends CatchBlock> handlers)
Creates a TryExpression representing a try block with any number of catch statements and neither a fault nor finally block.static TryStatement
tryCatch(Statement body, CatchBlock... handlers)
Creates a TryExpression representing a try block with any number of catch statements and neither a fault nor finally block, with varargs.static TryStatement
tryCatchFinally(Statement body, java.lang.Iterable<? extends CatchBlock> handlers, Statement finally_)
Creates a TryExpression representing a try block with any number of catch statements and a finally block.static TryStatement
tryCatchFinally(Statement body, Statement finally_, CatchBlock... handlers)
Creates a TryExpression representing a try block with any number of catch statements and a finally block, with varargs.static TryStatement
tryFinally(Statement body, Statement finally_)
Creates a TryExpression representing a try block with a finally block and no catch statements.static UnaryExpression
typeAs(Expression expression, java.lang.reflect.Type type)
Creates a UnaryExpression that represents an explicit reference or boxing conversion where null is supplied if the conversion fails.static TypeBinaryExpression
typeEqual(Expression expression, java.lang.reflect.Type type)
Creates a TypeBinaryExpression that compares run-time type identity.static TypeBinaryExpression
typeIs(Expression expression, java.lang.reflect.Type type)
Creates a TypeBinaryExpression.static UnaryExpression
unaryPlus(Expression expression)
Creates a UnaryExpression that represents a unary plus operation.static UnaryExpression
unaryPlus(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents a unary plus operation.static Expression
unbox(Expression expression)
Converts e.g.static UnaryExpression
unbox(Expression expression, java.lang.reflect.Type type)
Creates a UnaryExpression that represents an explicit unboxing.static Expression
unbox(Expression expression, Primitive primitive)
Returns an expression to unbox the value of a boxed-primitive expression.static ParameterExpression
variable(java.lang.reflect.Type type)
Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.static ParameterExpression
variable(java.lang.reflect.Type type, java.lang.String name)
Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.static Expression
visitChildren(ExpressionVisitor visitor)
Reduces the node and then calls the visitor delegate on the reduced expression.static WhileStatement
while_(Expression condition, Statement body)
Creates a WhileExpression representing a while loop.
-
-
-
Method Detail
-
toString
public static java.lang.String toString(java.util.List<? extends Node> expressions, java.lang.String sep, boolean generics)
Converts a list of expressions to Java source code, optionally emitting extra type information in generics.
-
toString
public static java.lang.String toString(Node expression)
Converts an expression to Java source code.
-
add
public static BinaryExpression add(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic addition operation that does not have overflow checking.
-
add
public static BinaryExpression add(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic addition operation that does not have overflow checking. The implementing method can be specified.
-
addAssign
public static BinaryExpression addAssign(Expression left, Expression right)
Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.
-
addAssign
public static BinaryExpression addAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.
-
addAssign
public static BinaryExpression addAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaLeft, LambdaExpression lambdaRight)
Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.
-
addAssignChecked
public static BinaryExpression addAssignChecked(Expression left, Expression right)
Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.
-
addAssignChecked
public static BinaryExpression addAssignChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.
-
addAssignChecked
public static BinaryExpression addAssignChecked(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.
-
addChecked
public static BinaryExpression addChecked(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic addition operation that has overflow checking.
-
addChecked
public static BinaryExpression addChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic addition operation that has overflow checking. The implementing method can be specified.
-
and
public static BinaryExpression and(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise AND operation.
-
and
public static BinaryExpression and(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise AND operation. The implementing method can be specified.
-
andAlso
public static BinaryExpression andAlso(Expression left, Expression right)
Creates a BinaryExpression that represents a conditional AND operation that evaluates the second operand only if the first operand evaluates to true.
-
andAlso
public static BinaryExpression andAlso(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a conditional AND operation that evaluates the second operand only if the first operand is resolved to true. The implementing method can be specified.
-
andAssign
public static BinaryExpression andAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise AND assignment operation.
-
andAssign
public static BinaryExpression andAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise AND assignment operation.
-
andAssign
public static BinaryExpression andAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a bitwise AND assignment operation.
-
arrayIndex
public static IndexExpression arrayIndex(Expression array, Expression indexExpression)
Creates an expression that represents applying an array index operator to an array of rank one.
-
arrayLength
public static UnaryExpression arrayLength(Expression array)
Creates a UnaryExpression that represents an expression for obtaining the length of a one-dimensional array.
-
assign
public static BinaryExpression assign(Expression left, Expression right)
Creates a BinaryExpression that represents an assignment operation.
-
bind
public static MemberAssignment bind(java.lang.reflect.Member member, Expression right)
Creates a MemberAssignment that represents the initialization of a field or property.
-
bind
public static MemberAssignment bind(java.lang.reflect.Method method, Expression expression)
Creates a MemberAssignment that represents the initialization of a member by using a property accessor method.
-
block
public static BlockStatement block(java.lang.Iterable<? extends Statement> statements)
Creates a BlockExpression that contains the given statements.
-
block
public static BlockStatement block(Statement... statements)
Creates a BlockExpression that contains the given statements, using varargs.
-
block
public static BlockStatement block(java.lang.reflect.Type type, java.lang.Iterable<? extends Statement> expressions)
Creates a BlockExpression that contains the given expressions, has no variables and has specific result type.
-
block
public static BlockStatement block(java.lang.reflect.Type type, Statement... statements)
Creates a BlockExpression that contains the given statements and has a specific result type, using varargs.
-
break_
public static GotoStatement break_(LabelTarget labelTarget)
Creates a GotoExpression representing a break statement.
-
break_
public static GotoStatement break_(LabelTarget labelTarget, Expression expression)
Creates a GotoExpression representing a break statement. The value passed to the label upon jumping can be specified.
-
break_
public static GotoStatement break_(LabelTarget labelTarget, java.lang.reflect.Type type)
Creates a GotoExpression representing a break statement with the specified type.
-
break_
public static GotoStatement break_(LabelTarget labelTarget, Expression expression, java.lang.reflect.Type type)
Creates a GotoExpression representing a break statement with the specified type. The value passed to the label upon jumping can be specified.
-
call
public static MethodCallExpression call(java.lang.reflect.Method method, java.lang.Iterable<? extends Expression> arguments)
Creates a MethodCallExpression that represents a call to a static method that has arguments.
-
call
public static MethodCallExpression call(java.lang.reflect.Method method, Expression... arguments)
Creates a MethodCallExpression that represents a call to a static method that has arguments, using varargs.
-
call
public static MethodCallExpression call(Expression expression, java.lang.reflect.Method method, java.lang.Iterable<? extends Expression> arguments)
Creates a MethodCallExpression that represents a call to a method that takes arguments.
-
call
public static MethodCallExpression call(Expression expression, java.lang.reflect.Method method, Expression... arguments)
Creates a MethodCallExpression that represents a call to a method that takes arguments, using varargs.
-
call
public static MethodCallExpression call(java.lang.reflect.Type returnType, Expression expression, java.lang.reflect.Method method, java.lang.Iterable<? extends Expression> arguments)
Creates a MethodCallExpression that represents a call to a method that takes arguments, with an explicit return type.The return type must be consistent with the return type of the method, but may contain extra information, such as type parameters.
The
expression
argument may be null if and only if the method is static.
-
call
public static MethodCallExpression call(java.lang.reflect.Type returnType, Expression expression, java.lang.reflect.Method method, Expression... arguments)
Creates a MethodCallExpression that represents a call to a method that takes arguments, with an explicit return type, with varargs.The return type must be consistent with the return type of the method, but may contain extra information, such as type parameters.
The
expression
argument may be null if and only if the method is static.
-
call
public static MethodCallExpression call(Expression target, java.lang.String methodName, java.lang.Iterable<? extends Expression> arguments)
Creates a MethodCallExpression that represents a call to an instance method by calling the appropriate factory method.
-
call
public static MethodCallExpression call(Expression target, java.lang.String methodName, Expression... arguments)
Creates a MethodCallExpression that represents a call to an instance method by calling the appropriate factory method, using varargs.
-
call
public static MethodCallExpression call(java.lang.reflect.Type type, java.lang.String methodName, java.lang.Iterable<? extends Expression> arguments)
Creates a MethodCallExpression that represents a call to a static method by calling the appropriate factory method.
-
call
public static MethodCallExpression call(java.lang.reflect.Type type, java.lang.String methodName, Expression... arguments)
Creates a MethodCallExpression that represents a call to a static method by calling the appropriate factory method, using varargs.
-
catch_
public static CatchBlock catch_(ParameterExpression parameter, Statement statement)
Creates a CatchBlock representing a catch statement with a reference to the caught Exception object for use in the handler body.
-
clearDebugInfo
public static void clearDebugInfo()
Creates a DebugInfoExpression for clearing a sequence point.
-
coalesce
public static BinaryExpression coalesce(Expression left, Expression right)
Creates a BinaryExpression that represents a coalescing operation.
-
coalesce
public static BinaryExpression coalesce(Expression left, Expression right, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a coalescing operation, given a conversion function.
-
condition
public static Expression condition(Expression test, Expression ifTrue, Expression ifFalse)
Creates a ConditionalExpression that represents a conditional statement.
-
box
private static java.lang.reflect.Type box(java.lang.reflect.Type type)
-
isConstantNull
public static boolean isConstantNull(Expression e)
Returns whether an expression always evaluates to null.
-
condition
public static ConditionalExpression condition(Expression test, Expression ifTrue, Expression ifFalse, java.lang.reflect.Type type)
Creates a ConditionalExpression that represents a conditional statement.This method allows explicitly unifying the result type of the conditional expression in cases where the types of ifTrue and ifFalse expressions are not equal. Types of both ifTrue and ifFalse must be implicitly reference assignable to the result type. The type is allowed to be
void
.
-
constant
public static ConstantExpression constant(java.lang.Object value)
Creates a ConstantExpression that has the Value property set to the specified value.Does the right thing for null, String, primitive values (e.g. int 12, short 12, double 3.14 and boolean false), boxed primitives (e.g. Integer.valueOf(12)), enums, classes, BigDecimal, BigInteger, classes that have a constructor with a parameter for each field, and arrays.
-
constant
public static ConstantExpression constant(java.lang.Object value, java.lang.reflect.Type type)
Creates a ConstantExpression that has the Value and Type properties set to the specified values.
-
continue_
public static GotoStatement continue_(LabelTarget labelTarget)
Creates a GotoExpression representing a continue statement.
-
continue_
public static GotoStatement continue_(LabelTarget labelTarget, java.lang.reflect.Type type)
Creates a GotoExpression representing a continue statement with the specified type.
-
convert_
public static UnaryExpression convert_(Expression expression, java.lang.reflect.Type type)
Creates a UnaryExpression that represents a type conversion operation.
-
convert_
public static UnaryExpression convert_(Expression expression, java.lang.reflect.Type type, java.lang.reflect.Method method)
Creates a UnaryExpression that represents a conversion operation for which the implementing method is specified.
-
convertChecked
public static UnaryExpression convertChecked(Expression expression, java.lang.reflect.Type type)
Creates a UnaryExpression that represents a conversion operation that throws an exception if the target type is overflowed.
-
convertChecked_
public static UnaryExpression convertChecked_(Expression expression, java.lang.reflect.Type type, java.lang.reflect.Method method)
Creates a UnaryExpression that represents a conversion operation that throws an exception if the target type is overflowed and for which the implementing method is specified.
-
debugInfo
public static void debugInfo()
Creates a DebugInfoExpression with the specified span.
-
decrement
public static UnaryExpression decrement(Expression expression)
Creates a UnaryExpression that represents the decrementing of the expression by 1.
-
decrement
public static UnaryExpression decrement(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents the decrementing of the expression by 1.
-
default_
public static DefaultExpression default_()
Creates a DefaultExpression that has the Type property set to the specified type.
-
divide
public static BinaryExpression divide(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic division operation.
-
divide
public static BinaryExpression divide(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic division operation. The implementing method can be specified.
-
divideAssign
public static BinaryExpression divideAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.
-
divideAssign
public static BinaryExpression divideAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.
-
divideAssign
public static BinaryExpression divideAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.
-
dynamic
public static DynamicExpression dynamic(CallSiteBinder binder, java.lang.reflect.Type type, java.lang.Iterable<? extends Expression> expressions)
Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.
-
dynamic
public static DynamicExpression dynamic(CallSiteBinder binder, java.lang.reflect.Type type, Expression... expression)
Creates aDynamicExpression
that represents a dynamic operation bound by the providedCallSiteBinder
, using varargs.
-
elementInit
public static ElementInit elementInit(java.lang.reflect.Method method, java.lang.Iterable<? extends Expression> expressions)
Creates anElementInit
, given anIterable<T>
as the second argument.
-
elementInit
public static ElementInit elementInit(java.lang.reflect.Method method, Expression... expressions)
Creates an ElementInit, given an array of values as the second argument, using varargs.
-
empty
public static DefaultExpression empty()
Creates an empty expression that has Void type.
-
equal
public static BinaryExpression equal(Expression left, Expression right)
Creates a BinaryExpression that represents an equality comparison.
-
equal
public static BinaryExpression equal(Expression expression0, Expression expression1, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an equality comparison. The implementing method can be specified.
-
exclusiveOr
public static BinaryExpression exclusiveOr(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise XOR operation, using op_ExclusiveOr for user-defined types.
-
exclusiveOr
public static BinaryExpression exclusiveOr(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise XOR operation, using op_ExclusiveOr for user-defined types. The implementing method can be specified.
-
exclusiveOrAssign
public static BinaryExpression exclusiveOrAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.
-
exclusiveOrAssign
public static BinaryExpression exclusiveOrAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.
-
exclusiveOrAssign
public static BinaryExpression exclusiveOrAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.
-
field
public static MemberExpression field(Expression expression, java.lang.reflect.Field field)
Creates a MemberExpression that represents accessing a field.
-
field
public static MemberExpression field(Expression expression, PseudoField field)
Creates a MemberExpression that represents accessing a field.
-
field
public static MemberExpression field(Expression expression, java.lang.String fieldName)
Creates a MemberExpression that represents accessing a field given the name of the field.
-
field
public static MemberExpression field(Expression expression, java.lang.reflect.Type type, java.lang.String fieldName)
Creates a MemberExpression that represents accessing a field.
-
getActionType
public static java.lang.Class getActionType(java.lang.Class... typeArgs)
Creates a Type object that represents a generic System.Action delegate type that has specific type arguments.
-
getDelegateType
public static java.lang.Class getDelegateType(java.lang.Class... typeArgs)
Gets a Type object that represents a generic System.Func or System.Action delegate type that has specific type arguments.
-
getFuncType
public static java.lang.Class getFuncType(java.lang.Class... typeArgs)
Creates a Type object that represents a generic System.Func delegate type that has specific type arguments. The last type argument specifies the return type of the created delegate.
-
goto_
public static GotoStatement goto_(LabelTarget labelTarget)
Creates a GotoExpression representing a "go to" statement.
-
goto_
public static GotoStatement goto_(LabelTarget labelTarget, Expression expression)
Creates a GotoExpression representing a "go to" statement. The value passed to the label upon jumping can be specified.
-
goto_
public static GotoStatement goto_(LabelTarget labelTarget, java.lang.reflect.Type type)
Creates a GotoExpression representing a "go to" statement with the specified type.
-
goto_
public static GotoStatement goto_(LabelTarget labelTarget, Expression expression, java.lang.reflect.Type type)
Creates a GotoExpression representing a "go to" statement with the specified type. The value passed to the label upon jumping can be specified.
-
greaterThan
public static BinaryExpression greaterThan(Expression left, Expression right)
Creates a BinaryExpression that represents a "greater than" numeric comparison.
-
greaterThan
public static BinaryExpression greaterThan(Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a "greater than" numeric comparison. The implementing method can be specified.
-
greaterThanOrEqual
public static BinaryExpression greaterThanOrEqual(Expression left, Expression right)
Creates a BinaryExpression that represents a "greater than or equal" numeric comparison.
-
greaterThanOrEqual
public static BinaryExpression greaterThanOrEqual(Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a "greater than or equal" numeric comparison.
-
ifThen
public static ConditionalStatement ifThen(Expression test, Node ifTrue)
Creates a ConditionalExpression that represents a conditional block with an if statement.
-
ifThenElse
public static ConditionalStatement ifThenElse(Expression test, Node ifTrue, Node ifFalse)
Creates a ConditionalExpression that represents a conditional block with if and else statements.
-
ifThenElse
public static ConditionalStatement ifThenElse(Expression test, Node... nodes)
Creates a ConditionalExpression that represents a conditional block with if and else statements:if (test) stmt1 [ else if (test2) stmt2 ]... [ else stmtN ]
.
-
ifThenElse
public static ConditionalStatement ifThenElse(java.lang.Iterable<? extends Node> nodes)
Creates a ConditionalExpression that represents a conditional block with if and else statements:if (test) stmt1 [ else if (test2) stmt2 ]... [ else stmtN ]
.
-
increment
public static UnaryExpression increment(Expression expression)
Creates a UnaryExpression that represents the incrementing of the expression value by 1.
-
increment
public static UnaryExpression increment(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents the incrementing of the expression by 1.
-
invoke
public static InvocationExpression invoke(Expression expression, java.lang.Iterable<? extends Expression> arguments)
Creates an InvocationExpression that applies a delegate or lambda expression to a list of argument expressions.
-
invoke
public static InvocationExpression invoke(Expression expression, Expression... arguments)
Creates an InvocationExpression that applies a delegate or lambda expression to a list of argument expressions, using varargs.
-
isFalse
public static UnaryExpression isFalse(Expression expression)
Returns whether the expression evaluates to false.
-
isFalse
public static UnaryExpression isFalse(Expression expression, java.lang.reflect.Method method)
Returns whether the expression evaluates to false.
-
isTrue
public static UnaryExpression isTrue(Expression expression)
Returns whether the expression evaluates to true.
-
isTrue
public static UnaryExpression isTrue(Expression expression, java.lang.reflect.Method method)
Returns whether the expression evaluates to true.
-
label
public static LabelTarget label()
Creates a LabelTarget representing a label with X type and no name.
-
label
public static LabelStatement label(LabelTarget labelTarget)
Creates a LabelExpression representing a label without a default value.
-
label
public static LabelTarget label(java.lang.String name)
Creates a LabelTarget representing a label with X type and the given name.
-
label
public static LabelTarget label(java.lang.reflect.Type type)
Creates a LabelTarget representing a label with the given type.
-
label
public static LabelStatement label(LabelTarget labelTarget, Expression expression)
Creates a LabelExpression representing a label with the given default value.
-
label
public static LabelTarget label(java.lang.reflect.Type type, java.lang.String name)
Creates a LabelTarget representing a label with the given type and name.
-
lambda
public static <F extends Function<?>> FunctionExpression<F> lambda(F function)
Creates a FunctionExpression from an actual function.
-
lambda
public static <F extends Function<?>> FunctionExpression<F> lambda(BlockStatement body, java.lang.Iterable<? extends ParameterExpression> parameters)
Creates a LambdaExpression by first constructing a delegate type.
-
lambda
public static <F extends Function<?>> FunctionExpression<F> lambda(BlockStatement body, ParameterExpression... parameters)
Creates a LambdaExpression by first constructing a delegate type, using varargs.
-
lambda
public static <F extends Function<?>> FunctionExpression<F> lambda(Expression body, java.lang.Iterable<? extends ParameterExpression> parameters)
Creates an Expression where the delegate typeF
is known at compile time.
-
lambda
public static <F extends Function<?>> FunctionExpression<F> lambda(Expression body, ParameterExpression... parameters)
Creates an Expression where the delegate typeF
is known at compile time, using varargs.
-
lambda
public static <T,F extends Function<? extends T>> FunctionExpression<F> lambda(java.lang.Class<F> type, BlockStatement body, java.lang.Iterable<? extends ParameterExpression> parameters)
Creates a LambdaExpression by first constructing a delegate type.It can be used when the delegate type is not known at compile time.
-
lambda
public static <T,F extends Function<? extends T>> FunctionExpression<F> lambda(java.lang.Class<F> type, BlockStatement body, ParameterExpression... parameters)
Creates a LambdaExpression by first constructing a delegate type, using varargs.It can be used when the delegate type is not known at compile time.
-
lambda
public static <T,F extends Function<? extends T>> FunctionExpression<F> lambda(java.lang.Class<F> type, Expression body, java.lang.Iterable<? extends ParameterExpression> parameters)
Creates a LambdaExpression by first constructing a delegate type.It can be used when the delegate type is not known at compile time.
-
lambda
public static <T,F extends Function<? extends T>> FunctionExpression<F> lambda(java.lang.Class<F> type, Expression body, ParameterExpression... parameters)
Creates a LambdaExpression by first constructing a delegate type, using varargs.It can be used when the delegate type is not known at compile time.
-
leftShift
public static BinaryExpression leftShift(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise left-shift operation.
-
leftShift
public static BinaryExpression leftShift(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise left-shift operation.
-
leftShiftAssign
public static BinaryExpression leftShiftAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise left-shift assignment operation.
-
leftShiftAssign
public static BinaryExpression leftShiftAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise left-shift assignment operation.
-
leftShiftAssign
public static BinaryExpression leftShiftAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a bitwise left-shift assignment operation.
-
lessThan
public static BinaryExpression lessThan(Expression left, Expression right)
Creates a BinaryExpression that represents a "less than" numeric comparison.
-
lessThan
public static BinaryExpression lessThan(Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a "less than" numeric comparison.
-
lessThanOrEqual
public static BinaryExpression lessThanOrEqual(Expression left, Expression right)
Creates a BinaryExpression that represents a " less than or equal" numeric comparison.
-
lessThanOrEqual
public static BinaryExpression lessThanOrEqual(Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a "less than or equal" numeric comparison.
-
listBind
public static MemberListBinding listBind(java.lang.reflect.Member member, java.lang.Iterable<? extends ElementInit> elementInits)
Creates a MemberListBinding where the member is a field or property.
-
listBind
public static MemberListBinding listBind(java.lang.reflect.Member member, ElementInit... elementInits)
Creates a MemberListBinding where the member is a field or property, using varargs.
-
listBind
public static MemberListBinding listBind(java.lang.reflect.Method method, java.lang.Iterable<? extends ElementInit> elementInits)
Creates a MemberListBinding based on a specified property accessor method.
-
listBind
public static MemberListBinding listBind(java.lang.reflect.Method method, ElementInit... elementInits)
Creates a MemberListBinding object based on a specified property accessor method, using varargs.
-
listInit
public static ListInitExpression listInit(NewExpression newExpression, java.lang.Iterable<? extends ElementInit> elementInits)
Creates a ListInitExpression that uses specified ElementInit objects to initialize a collection.
-
listInit
public static ListInitExpression listInit(NewExpression newExpression, ElementInit... elementInits)
Creates a ListInitExpression that uses specified ElementInit objects to initialize a collection, using varargs.
-
listInitE
public static ListInitExpression listInitE(NewExpression newExpression, java.lang.Iterable<? extends Expression> arguments)
Creates a ListInitExpression that uses a method named "Add" to add elements to a collection.
-
listInit
public static ListInitExpression listInit(NewExpression newExpression, Expression... arguments)
Creates a ListInitExpression that uses a method named "Add" to add elements to a collection, using varargs.
-
listInit
public static ListInitExpression listInit(NewExpression newExpression, java.lang.reflect.Method method, java.lang.Iterable<? extends Expression> arguments)
Creates a ListInitExpression that uses a specified method to add elements to a collection.
-
listInit
public static ListInitExpression listInit(NewExpression newExpression, java.lang.reflect.Method method, Expression... arguments)
Creates a ListInitExpression that uses a specified method to add elements to a collection, using varargs.
-
for_
public static ForStatement for_(java.lang.Iterable<? extends DeclarationStatement> declarations, Expression condition, Expression post, Statement body)
Creates a LoopExpression with the given body.
-
for_
public static ForStatement for_(DeclarationStatement declaration, Expression condition, Expression post, Statement body)
Creates a LoopExpression with the given body.
-
makeBinary
public static BinaryExpression makeBinary(ExpressionType binaryType, Expression left, Expression right)
Creates a BinaryExpression, given the left and right operands, by calling an appropriate factory method.
-
box
public static Expression box(Expression expression, Primitive primitive)
Returns an expression to box the value of a primitive expression. E.g.box(e, Primitive.INT)
returnsInteger.valueOf(e)
.
-
box
public static Expression box(Expression expression)
Converts e.g. "anInteger" to "Integer.valueOf(anInteger)".
-
unbox
public static Expression unbox(Expression expression, Primitive primitive)
Returns an expression to unbox the value of a boxed-primitive expression. E.g.unbox(e, Primitive.INT)
returnse.intValue()
. It is assumed that e is of the right box type (orNumber
)."Value
-
unbox
public static Expression unbox(Expression expression)
Converts e.g. "anInteger" to "anInteger.intValue()".
-
largest
private java.lang.reflect.Type largest(java.lang.reflect.Type... types)
-
larger
private static java.lang.reflect.Type larger(java.lang.reflect.Type type0, java.lang.reflect.Type type1)
-
makeBinary
public static BinaryExpression makeBinary(ExpressionType binaryType, Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression, given the left operand, right operand and implementing method, by calling the appropriate factory method.
-
makeBinary
public static BinaryExpression makeBinary(ExpressionType binaryType, Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression, given the left operand, right operand, implementing method and type conversion function, by calling the appropriate factory method.
-
makeTernary
public static TernaryExpression makeTernary(ExpressionType ternaryType, Expression e0, Expression e1, Expression e2)
Creates a TernaryExpression, given the left and right operands, by calling an appropriate factory method.
-
makeCatchBlock
public static CatchBlock makeCatchBlock(java.lang.reflect.Type type, ParameterExpression variable, Expression body, Expression filter)
Creates a CatchBlock representing a catch statement with the specified elements.
-
makeDynamic
public static DynamicExpression makeDynamic(java.lang.reflect.Type type, CallSiteBinder binder, java.lang.Iterable<? extends Expression> arguments)
Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.
-
makeDynamic
public static DynamicExpression makeDynamic(java.lang.reflect.Type type, CallSiteBinder binder, Expression... arguments)
Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder, using varargs.
-
makeGoto
public static GotoStatement makeGoto(GotoExpressionKind kind, LabelTarget target, Expression value, java.lang.reflect.Type type)
Creates a GotoExpression representing a jump of the specified GotoExpressionKind. The value passed to the label upon jumping can also be specified.
-
makeMemberAccess
public static MemberExpression makeMemberAccess(Expression expression, PseudoField member)
Creates a MemberExpression that represents accessing a field.
-
makeTry
public static TryStatement makeTry(java.lang.reflect.Type type, Expression body, Expression finally_, Expression fault, java.lang.Iterable<? extends CatchBlock> handlers)
Creates a TryExpression representing a try block with the specified elements.
-
makeTry
public static TryStatement makeTry(java.lang.reflect.Type type, Expression body, Expression finally_, Expression fault, CatchBlock... handlers)
Creates a TryExpression representing a try block with the specified elements, using varargs.
-
makeUnary
public static UnaryExpression makeUnary(ExpressionType expressionType, Expression expression)
Creates a UnaryExpression, given an operand, by calling the appropriate factory method.
-
makeUnary
public static UnaryExpression makeUnary(ExpressionType expressionType, Expression expression, java.lang.reflect.Type type, java.lang.reflect.Method method)
Creates a UnaryExpression, given an operand and implementing method, by calling the appropriate factory method.
-
memberBind
public static MemberMemberBinding memberBind(java.lang.reflect.Member member, java.lang.Iterable<? extends MemberBinding> bindings)
Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property.
-
memberBind
public static MemberMemberBinding memberBind(java.lang.reflect.Member member, MemberBinding... bindings)
Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property, using varargs.
-
memberBind
public static MemberMemberBinding memberBind(java.lang.reflect.Method method, java.lang.Iterable<? extends MemberBinding> bindings)
Creates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method.
-
memberBind
public static MemberMemberBinding memberBind(java.lang.reflect.Method method, MemberBinding... bindings)
Creates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method, using varargs.
-
memberInit
public static MemberInitExpression memberInit(NewExpression newExpression, java.lang.Iterable<? extends MemberBinding> bindings)
Represents an expression that creates a new object and initializes a property of the object.
-
memberInit
public static MemberInitExpression memberInit(NewExpression newExpression, MemberBinding... bindings)
Represents an expression that creates a new object and initializes a property of the object, using varargs.
-
methodDecl
public static MethodDeclaration methodDecl(int modifier, java.lang.reflect.Type resultType, java.lang.String name, java.lang.Iterable<? extends ParameterExpression> parameters, BlockStatement body)
Declares a method.
-
constructorDecl
public static ConstructorDeclaration constructorDecl(int modifier, java.lang.reflect.Type declaredAgainst, java.lang.Iterable<? extends ParameterExpression> parameters, BlockStatement body)
Declares a constructor.
-
fieldDecl
public static FieldDeclaration fieldDecl(int modifier, ParameterExpression parameter, Expression initializer)
Declares a field with an initializer.
-
fieldDecl
public static FieldDeclaration fieldDecl(int modifier, ParameterExpression parameter)
Declares a field.
-
classDecl
public static ClassDeclaration classDecl(int modifier, java.lang.String name, java.lang.reflect.Type extended, java.util.List<java.lang.reflect.Type> implemented, java.util.List<MemberDeclaration> memberDeclarations)
Declares a class.
-
modulo
public static BinaryExpression modulo(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic remainder operation.
-
modulo
public static BinaryExpression modulo(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic remainder operation.
-
moduloAssign
public static BinaryExpression moduloAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a remainder assignment operation.
-
moduloAssign
public static BinaryExpression moduloAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a remainder assignment operation.
-
moduloAssign
public static BinaryExpression moduloAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a remainder assignment operation.
-
multiply
public static BinaryExpression multiply(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic multiplication operation that does not have overflow checking.
-
multiply
public static BinaryExpression multiply(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic multiplication operation that does not have overflow checking.
-
multiplyAssign
public static BinaryExpression multiplyAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.
-
multiplyAssign
public static BinaryExpression multiplyAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.
-
multiplyAssign
public static BinaryExpression multiplyAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.
-
multiplyAssignChecked
public static BinaryExpression multiplyAssignChecked(Expression left, Expression right)
Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.
-
multiplyAssignChecked
public static BinaryExpression multiplyAssignChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.
-
multiplyAssignChecked
public static BinaryExpression multiplyAssignChecked(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.
-
multiplyChecked
public static BinaryExpression multiplyChecked(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic multiplication operation that has overflow checking.
-
multiplyChecked
public static BinaryExpression multiplyChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic multiplication operation that has overflow checking.
-
negate
public static UnaryExpression negate(Expression expression)
Creates a UnaryExpression that represents an arithmetic negation operation.
-
negate
public static UnaryExpression negate(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents an arithmetic negation operation.
-
negateChecked
public static UnaryExpression negateChecked(Expression expression)
Creates a UnaryExpression that represents an arithmetic negation operation that has overflow checking.
-
negateChecked
public static UnaryExpression negateChecked(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents an arithmetic negation operation that has overflow checking. The implementing method can be specified.
-
new_
public static NewExpression new_(java.lang.reflect.Constructor constructor)
Creates a NewExpression that represents calling the specified constructor that takes no arguments.
-
new_
public static NewExpression new_(java.lang.reflect.Type type)
Creates a NewExpression that represents calling the parameterless constructor of the specified type.
-
new_
public static NewExpression new_(java.lang.reflect.Type type, java.lang.Iterable<? extends Expression> arguments)
Creates a NewExpression that represents calling the constructor of the specified type whose parameters are assignable from the specified arguments.
-
new_
public static NewExpression new_(java.lang.reflect.Type type, Expression... arguments)
Creates a NewExpression that represents calling the constructor of the specified type whose parameters are assignable from the specified arguments, using varargs.
-
new_
public static NewExpression new_(java.lang.reflect.Type type, java.lang.Iterable<? extends Expression> arguments, java.lang.Iterable<? extends MemberDeclaration> memberDeclarations)
Creates a NewExpression that represents calling the constructor of the specified type whose parameters are assignable from the specified arguments.
-
new_
public static NewExpression new_(java.lang.reflect.Type type, java.lang.Iterable<? extends Expression> arguments, MemberDeclaration... memberDeclarations)
Creates a NewExpression that represents calling the constructor of the specified type whose parameters are assignable from the specified arguments, using varargs.
-
new_
public static NewExpression new_(java.lang.reflect.Constructor constructor, java.lang.Iterable<? extends Expression> expressions)
Creates a NewExpression that represents calling the specified constructor with the specified arguments.
-
new_
public static NewExpression new_(java.lang.reflect.Constructor constructor, Expression... expressions)
Creates a NewExpression that represents calling the specified constructor with the specified arguments, using varargs.
-
new_
public static NewExpression new_(java.lang.reflect.Constructor constructor, java.lang.Iterable<? extends Expression> expressions, java.lang.Iterable<? extends MemberDeclaration> memberDeclarations)
Creates a NewExpression that represents calling the specified constructor with the specified arguments.The members that access the constructor initialized fields are specified.
-
new_
public static NewExpression new_(java.lang.reflect.Constructor constructor, java.lang.Iterable<? extends Expression> expressions, MemberDeclaration... memberDeclarations)
Creates a NewExpression that represents calling the specified constructor with the specified arguments, using varargs.The members that access the constructor initialized fields are specified.
-
newArrayBounds
public static NewArrayExpression newArrayBounds(java.lang.reflect.Type type, int dimension, Expression bound)
Creates a NewArrayExpression that represents creating an array that has a specified rank.
-
newArrayInit
public static NewArrayExpression newArrayInit(java.lang.reflect.Type type, java.lang.Iterable<? extends Expression> expressions)
Creates a NewArrayExpression that represents creating a one-dimensional array and initializing it from a list of elements.- Parameters:
type
- Element type of the array.
-
newArrayInit
public static NewArrayExpression newArrayInit(java.lang.reflect.Type type, Expression... expressions)
Creates a NewArrayExpression that represents creating a one-dimensional array and initializing it from a list of elements, using varargs.- Parameters:
type
- Element type of the array.
-
newArrayInit
public static NewArrayExpression newArrayInit(java.lang.reflect.Type type, int dimension, java.lang.Iterable<? extends Expression> expressions)
Creates a NewArrayExpression that represents creating a n-dimensional array and initializing it from a list of elements.- Parameters:
type
- Element type of the array.
-
newArrayInit
public static NewArrayExpression newArrayInit(java.lang.reflect.Type type, int dimension, Expression... expressions)
Creates a NewArrayExpression that represents creating an n-dimensional array and initializing it from a list of elements, using varargs.- Parameters:
type
- Element type of the array.
-
not
public static UnaryExpression not(Expression expression)
Creates a UnaryExpression that represents a bitwise complement operation.
-
not
public static UnaryExpression not(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents a bitwise complement operation. The implementing method can be specified.
-
notEqual
public static BinaryExpression notEqual(Expression left, Expression right)
Creates a BinaryExpression that represents an inequality comparison.
-
notEqual
public static BinaryExpression notEqual(Expression left, Expression right, boolean liftToNull, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an inequality comparison.
-
onesComplement
public static UnaryExpression onesComplement(Expression expression)
Returns the expression representing the ones complement.
-
onesComplement
public static UnaryExpression onesComplement(Expression expression, java.lang.reflect.Method method)
Returns the expression representing the ones complement.
-
or
public static BinaryExpression or(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise OR operation.
-
or
public static BinaryExpression or(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise OR operation.
-
orAssign
public static BinaryExpression orAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise OR assignment operation.
-
orAssign
public static BinaryExpression orAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise OR assignment operation.
-
orAssign
public static BinaryExpression orAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a bitwise OR assignment operation.
-
orElse
public static BinaryExpression orElse(Expression left, Expression right)
Creates a BinaryExpression that represents a conditional OR operation that evaluates the second operand only if the first operand evaluates to false.
-
orElse
public static BinaryExpression orElse(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a conditional OR operation that evaluates the second operand only if the first operand evaluates to false.
-
parameter
public static ParameterExpression parameter(java.lang.reflect.Type type)
Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
-
parameter
public static ParameterExpression parameter(java.lang.reflect.Type type, java.lang.String name)
Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
-
parameter
public static ParameterExpression parameter(int modifiers, java.lang.reflect.Type type, java.lang.String name)
Creates a ParameterExpression.
-
postDecrementAssign
public static UnaryExpression postDecrementAssign(Expression expression)
Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent decrement by 1 of the original expression.
-
postDecrementAssign
public static UnaryExpression postDecrementAssign(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent decrement by 1 of the original expression.
-
postIncrementAssign
public static UnaryExpression postIncrementAssign(Expression expression)
Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent increment by 1 of the original expression.
-
postIncrementAssign
public static UnaryExpression postIncrementAssign(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent increment by 1 of the original expression.
-
power
public static BinaryExpression power(Expression left, Expression right)
Creates a BinaryExpression that represents raising a number to a power.
-
power
public static BinaryExpression power(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents raising a number to a power.
-
powerAssign
public static BinaryExpression powerAssign(Expression left, Expression right)
Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.
-
powerAssign
public static BinaryExpression powerAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.
-
powerAssign
public static BinaryExpression powerAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.
-
preDecrementAssign
public static UnaryExpression preDecrementAssign(Expression expression)
Creates a UnaryExpression that decrements the expression by 1 and assigns the result back to the expression.
-
preDecrementAssign
public static UnaryExpression preDecrementAssign(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that decrements the expression by 1 and assigns the result back to the expression.
-
preIncrementAssign
public static UnaryExpression preIncrementAssign(Expression expression)
Creates a UnaryExpression that increments the expression by 1 and assigns the result back to the expression.
-
preIncrementAssign
public static UnaryExpression preIncrementAssign(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that increments the expression by 1 and assigns the result back to the expression.
-
property
public static MemberExpression property(Expression expression, java.lang.reflect.Method method)
Creates a MemberExpression that represents accessing a property by using a property accessor method.
-
property
public static MemberExpression property(Expression expression, Expressions.PropertyInfo property)
Creates a MemberExpression that represents accessing a property.
-
property
public static MemberExpression property(Expression expression, java.lang.String name)
Creates a MemberExpression that represents accessing a property.
-
property
public static IndexExpression property(Expression expression, Expressions.PropertyInfo property, java.lang.Iterable<? extends Expression> arguments)
Creates an IndexExpression representing the access to an indexed property.
-
property
public static IndexExpression property(Expression expression, Expressions.PropertyInfo property, Expression... arguments)
Creates an IndexExpression representing the access to an indexed property, using varargs.
-
property
public static IndexExpression property(Expression expression, java.lang.String name, Expression... arguments)
Creates an IndexExpression representing the access to an indexed property.
-
property
public static MemberExpression property(Expression expression, java.lang.reflect.Type type, java.lang.String name)
Creates a MemberExpression accessing a property.
-
propertyOrField
public static MemberExpression propertyOrField(Expression expression, java.lang.String propertyOfFieldName)
Creates a MemberExpression that represents accessing a property or field.
-
quote
public static UnaryExpression quote(Expression expression)
Creates a UnaryExpression that represents an expression that has a constant value of type Expression.
-
reduce
public static Expression reduce(Expression expression)
Reduces this node to a simpler expression. If CanReduce returns true, this should return a valid expression. This method can return another node which itself must be reduced.
-
reduceAndCheck
public static Expression reduceAndCheck(Expression expression)
Reduces this node to a simpler expression. If CanReduce returns true, this should return a valid expression. This method can return another node which itself must be reduced.
-
reduceExtensions
public static Expression reduceExtensions(Expression expression)
Reduces the expression to a known node type (that is not an Extension node) or just returns the expression if it is already a known type.
-
referenceEqual
public static Expression referenceEqual(Expression left, Expression right)
Creates a BinaryExpression that represents a reference equality comparison.
-
referenceNotEqual
public static Expression referenceNotEqual(Expression left, Expression right)
Creates a BinaryExpression that represents a reference inequality comparison.
-
rethrow
public static UnaryExpression rethrow()
Creates a UnaryExpression that represents a rethrowing of an exception.
-
rethrow
public static UnaryExpression rethrow(java.lang.reflect.Type type)
Creates a UnaryExpression that represents a rethrowing of an exception with a given type.
-
return_
public static GotoStatement return_(LabelTarget labelTarget)
Creates a GotoExpression representing a return statement.
-
return_
public static GotoStatement return_(LabelTarget labelTarget, Expression expression)
Creates a GotoExpression representing a return statement. The value passed to the label upon jumping can be specified.
-
makeGoto
public static GotoStatement makeGoto(GotoExpressionKind kind, LabelTarget labelTarget, Expression expression)
-
return_
public static GotoStatement return_(LabelTarget labelTarget, java.lang.reflect.Type type)
Creates a GotoExpression representing a return statement with the specified type.
-
return_
public static GotoStatement return_(LabelTarget labelTarget, Expression expression, java.lang.reflect.Type type)
Creates a GotoExpression representing a return statement with the specified type. The value passed to the label upon jumping can be specified.
-
rightShift
public static BinaryExpression rightShift(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise right-shift operation.
-
rightShift
public static BinaryExpression rightShift(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise right-shift operation.
-
rightShiftAssign
public static BinaryExpression rightShiftAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a bitwise right-shift assignment operation.
-
rightShiftAssign
public static BinaryExpression rightShiftAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a bitwise right-shift assignment operation.
-
rightShiftAssign
public static BinaryExpression rightShiftAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a bitwise right-shift assignment operation.
-
runtimeVariables
public static Expressions.RuntimeVariablesExpression runtimeVariables(java.lang.Iterable<? extends ParameterExpression> expressions)
Creates an instance of RuntimeVariablesExpression.
-
runtimeVariables
public static Expressions.RuntimeVariablesExpression runtimeVariables(ParameterExpression... arguments)
Creates an instance of RuntimeVariablesExpression, using varargs.
-
subtract
public static BinaryExpression subtract(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic subtraction operation that does not have overflow checking.
-
subtract
public static BinaryExpression subtract(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic subtraction operation that does not have overflow checking.
-
subtractAssign
public static BinaryExpression subtractAssign(Expression left, Expression right)
Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.
-
subtractAssign
public static BinaryExpression subtractAssign(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.
-
subtractAssign
public static BinaryExpression subtractAssign(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.
-
subtractAssignChecked
public static BinaryExpression subtractAssignChecked(Expression left, Expression right)
Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.
-
subtractAssignChecked
public static BinaryExpression subtractAssignChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.
-
subtractAssignChecked
public static BinaryExpression subtractAssignChecked(Expression left, Expression right, java.lang.reflect.Method method, LambdaExpression lambdaExpression)
Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.
-
subtractChecked
public static BinaryExpression subtractChecked(Expression left, Expression right)
Creates a BinaryExpression that represents an arithmetic subtraction operation that has overflow checking.
-
subtractChecked
public static BinaryExpression subtractChecked(Expression left, Expression right, java.lang.reflect.Method method)
Creates a BinaryExpression that represents an arithmetic subtraction operation that has overflow checking.
-
switch_
public static SwitchStatement switch_(Expression switchValue, SwitchCase... cases)
Creates a SwitchExpression that represents a switch statement without a default case.
-
switch_
public static SwitchStatement switch_(Expression switchValue, Expression defaultBody, SwitchCase... cases)
Creates a SwitchExpression that represents a switch statement that has a default case.
-
switch_
public static SwitchStatement switch_(Expression switchValue, Expression defaultBody, java.lang.reflect.Method method, java.lang.Iterable<? extends SwitchCase> cases)
Creates a SwitchExpression that represents a switch statement that has a default case.
-
switch_
public static SwitchStatement switch_(Expression switchValue, Expression defaultBody, java.lang.reflect.Method method, SwitchCase... cases)
Creates a SwitchExpression that represents a switch statement that has a default case, using varargs.
-
switch_
public static SwitchStatement switch_(java.lang.reflect.Type type, Expression switchValue, Expression defaultBody, java.lang.reflect.Method method, java.lang.Iterable<? extends SwitchCase> cases)
Creates a SwitchExpression that represents a switch statement that has a default case.
-
switch_
public static SwitchStatement switch_(java.lang.reflect.Type type, Expression switchValue, Expression defaultBody, java.lang.reflect.Method method, SwitchCase... cases)
Creates a SwitchExpression that represents a switch statement that has a default case, using varargs.
-
switchCase
public static SwitchCase switchCase(Expression expression, java.lang.Iterable<? extends Expression> body)
Creates a SwitchCase for use in a SwitchExpression.
-
switchCase
public static SwitchCase switchCase(Expression expression, Expression... body)
Creates a SwitchCase for use in a SwitchExpression, with varargs.
-
symbolDocument
public static Expressions.SymbolDocumentInfo symbolDocument(java.lang.String fileName)
Creates an instance of SymbolDocumentInfo.
-
symbolDocument
public static Expressions.SymbolDocumentInfo symbolDocument(java.lang.String fileName, java.util.UUID language)
Creates an instance of SymbolDocumentInfo.
-
symbolDocument
public static Expressions.SymbolDocumentInfo symbolDocument(java.lang.String fileName, java.util.UUID language, java.util.UUID vendor)
Creates an instance of SymbolDocumentInfo.
-
symbolDocument
public static Expressions.SymbolDocumentInfo symbolDocument(java.lang.String filename, java.util.UUID language, java.util.UUID vendor, java.util.UUID documentType)
Creates an instance of SymbolDocumentInfo.
-
throw_
public static ThrowStatement throw_(Expression expression)
Creates a statement that represents the throwing of an exception.
-
tryCatch
public static TryStatement tryCatch(Statement body, java.lang.Iterable<? extends CatchBlock> handlers)
Creates a TryExpression representing a try block with any number of catch statements and neither a fault nor finally block.
-
tryCatch
public static TryStatement tryCatch(Statement body, CatchBlock... handlers)
Creates a TryExpression representing a try block with any number of catch statements and neither a fault nor finally block, with varargs.
-
tryCatchFinally
public static TryStatement tryCatchFinally(Statement body, java.lang.Iterable<? extends CatchBlock> handlers, Statement finally_)
Creates a TryExpression representing a try block with any number of catch statements and a finally block.
-
tryCatchFinally
public static TryStatement tryCatchFinally(Statement body, Statement finally_, CatchBlock... handlers)
Creates a TryExpression representing a try block with any number of catch statements and a finally block, with varargs.
-
tryFinally
public static TryStatement tryFinally(Statement body, Statement finally_)
Creates a TryExpression representing a try block with a finally block and no catch statements.
-
typeAs
public static UnaryExpression typeAs(Expression expression, java.lang.reflect.Type type)
Creates a UnaryExpression that represents an explicit reference or boxing conversion where null is supplied if the conversion fails.
-
typeEqual
public static TypeBinaryExpression typeEqual(Expression expression, java.lang.reflect.Type type)
Creates a TypeBinaryExpression that compares run-time type identity.
-
typeIs
public static TypeBinaryExpression typeIs(Expression expression, java.lang.reflect.Type type)
Creates a TypeBinaryExpression.
-
unaryPlus
public static UnaryExpression unaryPlus(Expression expression)
Creates a UnaryExpression that represents a unary plus operation.
-
unaryPlus
public static UnaryExpression unaryPlus(Expression expression, java.lang.reflect.Method method)
Creates a UnaryExpression that represents a unary plus operation.
-
unbox
public static UnaryExpression unbox(Expression expression, java.lang.reflect.Type type)
Creates a UnaryExpression that represents an explicit unboxing.
-
variable
public static ParameterExpression variable(java.lang.reflect.Type type)
Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
-
variable
public static ParameterExpression variable(java.lang.reflect.Type type, java.lang.String name)
Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
-
visitChildren
public static Expression visitChildren(ExpressionVisitor visitor)
Reduces the node and then calls the visitor delegate on the reduced expression. The method throws an exception if the node is not reducible.
-
while_
public static WhileStatement while_(Expression condition, Statement body)
Creates a WhileExpression representing a while loop.
-
declare
public static DeclarationStatement declare(int modifiers, ParameterExpression parameter, Expression initializer)
Creates a statement that declares a variable.
-
declare
public static DeclarationStatement declare(int modifiers, java.lang.String name, Expression initializer)
Creates an expression that declares and initializes a variable. No type is required; it is assumed that the variable is the same type as the initializer. You can retrieve theParameterExpression
from theDeclarationStatement.parameter
field of the result.
-
statement
public static Statement statement(Expression expression)
Creates a statement that executes an expression.
-
foldAnd
public static Expression foldAnd(java.util.List<Expression> conditions)
Combines a list of expressions using AND. Returns TRUE if the list is empty. Returns FALSE if any of the conditions are constant FALSE; otherwise returns NULL if any of the conditions are constant NULL.
-
foldOr
public static Expression foldOr(java.util.List<Expression> conditions)
Combines a list of expressions using OR. Returns FALSE if the list is empty. Returns TRUE if any of the conditions are constant TRUE; otherwise returns NULL if all of the conditions are constant NULL.
-
list
public static <T> Expressions.FluentList<T> list()
Creates an empty fluent list.
-
list
@SafeVarargs public static <T> Expressions.FluentList<T> list(T... ts)
Creates a fluent list with given elements.
-
list
public static <T> Expressions.FluentList<T> list(java.lang.Iterable<T> ts)
Creates a fluent list with elements from the given collection.
-
shouldLift
private static boolean shouldLift(Expression left, Expression right, java.lang.reflect.Method method)
-
deduceType
private static java.lang.Class deduceType(java.util.List<ParameterExpression> parameterList, java.lang.reflect.Type type)
-
toList
private static <T> java.util.List<T> toList(java.lang.Iterable<? extends T> iterable)
-
toList
private static <T> java.util.List<T> toList(T[] ts)
-
toCollection
private static <T> java.util.Collection<T> toCollection(java.lang.Iterable<T> iterable)
-
toArray
private static <T> T[] toArray(java.lang.Iterable<T> iterable, T[] a)
-
accept
static <T extends Expression> Expression accept(T node, Shuttle shuttle)
-
acceptStatements
static java.util.List<Statement> acceptStatements(java.util.List<Statement> statements, Shuttle shuttle)
-
acceptParameterExpressions
static java.util.List<Expression> acceptParameterExpressions(java.util.List<ParameterExpression> parameterExpressions, Shuttle shuttle)
-
acceptDeclarations
static java.util.List<DeclarationStatement> acceptDeclarations(java.util.List<DeclarationStatement> declarations, Shuttle shuttle)
-
acceptMemberDeclarations
static java.util.List<MemberDeclaration> acceptMemberDeclarations(java.util.List<MemberDeclaration> memberDeclarations, Shuttle shuttle)
-
acceptExpressions
static java.util.List<Expression> acceptExpressions(java.util.List<Expression> expressions, Shuttle shuttle)
-
-