public abstract class Expression extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Expression(int expressionType,
@NonNull Class<?> resultType)
Initializes a new instance of the
Expression class. |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
accept(ExpressionVisitor<T> v)
Dispatches to the specific visit method for this node type.
|
static BinaryExpression |
add(Expression first,
Expression second)
Creates a
BinaryExpression that represents an arithmetic addition
operation that does not have overflow checking. |
static BinaryExpression |
arrayIndex(Expression array,
Expression index)
Creates a
BinaryExpression that represents applying an array index
operator to an array. |
static UnaryExpression |
arrayLength(Expression array)
Creates a
UnaryExpression that represents getting the length of an
array. |
static Expression |
binary(int expressionType,
Expression first,
Expression second)
Creates a
Expression, given an operand and binary operator, by
calling the appropriate factory method. |
static Expression |
binary(int expressionType,
Expression operator,
Expression first,
Expression second)
Creates a
Expression, given an operand and binary operator, by
calling the appropriate factory method. |
static BinaryExpression |
bitwiseAnd(Expression first,
Expression second)
Creates a
BinaryExpression that represents a bitwise AND operation. |
static UnaryExpression |
bitwiseNot(Expression e)
Creates a
UnaryExpression that represents a bitwise complement
operation. |
static BinaryExpression |
bitwiseOr(Expression first,
Expression second)
Creates a
BinaryExpression that represents a bitwise OR operation. |
static BlockExpression |
block(Class<?> resultType,
List<Expression> expressions)
Creates a
BlockExpression |
static BinaryExpression |
coalesce(Expression first,
Expression second)
Creates a
BinaryExpression that represents a coalescing operation. |
static Expression |
condition(Expression test,
Expression ifTrue,
Expression ifFalse)
Creates a
BinaryExpression that represents a conditional operation,
or one of operands in case test is a constant. |
static ConstantExpression |
constant(Object value)
Creates a
ConstantExpression that has the getValue() method set to
the specified value. |
static ConstantExpression |
constant(Object value,
Class<?> resultType)
Creates a
ConstantExpression that has the getValue() method set to
the specified value and resultType is assignable from its type. |
static Expression |
convert(Expression e,
Class<?> to)
Creates a
UnaryExpression that represents a conversion operation, or
'e' if its ResultType equals to 'to'. |
static DelegateExpression |
delegate(Class<?> resultType,
Expression delegate,
List<ParameterExpression> parameters)
Creates a
DelegateExpression as a method receiving the specified
arguments, returning the resultType and having delegate to
the implementation. |
static BinaryExpression |
divide(Expression first,
Expression second)
Creates a
BinaryExpression that represents an arithmetic division
operation. |
static Expression |
equal(Expression first,
Expression second)
Creates a
Expression that represents an equality comparison. |
boolean |
equals(Object o) |
static Expression |
exclusiveOr(Expression first,
Expression second)
Creates a
BinaryExpression that represents a bitwise XOR operation,
or UnaryExpression that represents a bitwise NOT in case the second
parameter equals to -1. |
static MemberExpression |
get(Class<?> type,
String name)
Creates a
MemberExpression that represents accessing a static field
given the name of the field. |
static MemberExpression |
get(Expression instance,
Field field)
Creates a
MemberExpression that represents accessing an instance
field. |
static MemberExpression |
get(Expression instance,
String name)
Creates a
MemberExpression that represents accessing an instance
field given the name of the field. |
static BinaryExpression |
greaterThan(Expression first,
Expression second)
Creates a
BinaryExpression that represents a "greater than" numeric
comparison. |
static BinaryExpression |
greaterThanOrEqual(Expression first,
Expression second)
Creates a
BinaryExpression that represents a "greater than or equal"
numeric comparison. |
static BinaryExpression |
instanceOf(Expression e,
Class<?> type)
Creates a
BinaryExpression that represents an instanceOf test. |
static BinaryExpression |
instanceOf(Expression e,
Expression type)
Creates a
BinaryExpression that represents an instanceOf test. |
static Expression |
invoke(Class<?> type,
String name,
Class<?>[] parameterTypes,
Expression... arguments)
Creates an
InvocationExpression that represents a call to a static
method by calling the appropriate factory method, or UnaryExpression
in case of boxing. |
static Expression |
invoke(Expression instance,
Method method,
Expression... arguments)
Creates an
InvocationExpression that represents a call to an instance
method, or UnaryExpression in case of boxing. |
static Expression |
invoke(Expression instance,
Method method,
List<Expression> arguments)
Creates an
InvocationExpression that represents a call to an instance
method, or UnaryExpression in case of boxing. |
static Expression |
invoke(Expression instance,
String name,
Class<?>[] parameterTypes,
Expression... arguments)
Creates an
InvocationExpression that represents a call to an instance
method by calling the appropriate factory method, or UnaryExpression
in case of boxing. |
static InvocationExpression |
invoke(InvocableExpression method,
Expression... arguments)
Creates an
InvocationExpression that represents a call to an instance
method. |
static InvocationExpression |
invoke(InvocableExpression method,
List<? extends Expression> arguments)
Creates an
InvocationExpression that represents a call to an instance
method. |
static UnaryExpression |
isNonNull(Expression e)
Creates a
UnaryExpression that represents a test for null operation. |
static UnaryExpression |
isNull(Expression e)
Creates a
UnaryExpression that represents a test for null operation. |
static LambdaExpression<?> |
lambda(Class<?> resultType,
Expression body,
List<ParameterExpression> parameters,
List<Expression> locals,
Object key)
Creates a
LambdaExpression as a method receiving the specified arguments, returning the
resultType and having body for its implementation. |
static BinaryExpression |
leftShift(Expression first,
Expression second)
Creates a
BinaryExpression that represents an arithmetic left-shift
operation. |
static BinaryExpression |
lessThan(Expression first,
Expression second)
Creates a
BinaryExpression that represents a "less than" numeric
comparison. |
static BinaryExpression |
lessThanOrEqual(Expression first,
Expression second)
Creates a
BinaryExpression that represents a "less than or equal"
numeric comparison. |
static Expression |
logicalAnd(Expression first,
Expression second)
Creates a
Expression that represents a conditional AND operation that
evaluates the second operand only if it has to. |
static Expression |
logicalNot(Expression e)
Creates a
Expression that represents a logical negation operation. |
static Expression |
logicalOr(Expression first,
Expression second)
Creates a
Expression that represents a conditional OR operation that
evaluates the second operand only if it has to. |
static MemberExpression |
member(int expressionType,
Expression instance,
Member member,
Class<?> resultType,
List<ParameterExpression> params)
Creates a
MemberExpression that accessed the specified member. |
static BinaryExpression |
modulo(Expression first,
Expression second)
Creates a
BinaryExpression that represents an arithmetic remainder
operation. |
static BinaryExpression |
multiply(Expression first,
Expression second)
Creates a
BinaryExpression that represents an arithmetic multiply
operation. |
static UnaryExpression |
negate(Expression e)
Creates a
UnaryExpression that represents an arithmetic negation
operation. |
static NewArrayInitExpression |
newArrayInit(Class<?> type,
List<Expression> initializers)
Creates a
NewArrayInitExpression that represents creating a
one-dimensional array and initializing it from a list of elements. |
static InvocationExpression |
newInstance(Class<?> type,
Class<?>[] argumentTypes,
Expression... arguments)
Creates a
InvocationExpression that represents calling the specified
constructor. |
static InvocationExpression |
newInstance(Constructor<?> method,
Expression... arguments)
Creates a
InvocationExpression that represents calling the specified
constructor. |
static InvocationExpression |
newInstance(Constructor<?> method,
List<Expression> arguments)
Creates a
InvocationExpression that represents calling the specified
constructor. |
static Expression |
notEqual(Expression first,
Expression second)
Creates a
Expression that represents an inequality comparison. |
static ParameterExpression |
parameter(Class<?> resultType,
int index)
Creates a
ParameterExpression. |
static BinaryExpression |
rightShift(Expression first,
Expression second)
Creates a
BinaryExpression that represents an arithmetic right-shift
operation. |
static BinaryExpression |
subtract(Expression first,
Expression second)
Creates a
BinaryExpression that represents an arithmetic subtract
operation. |
static Expression |
unary(int expressionType,
Class<?> resultType,
Expression operand)
Creates a
Expression, given an operand and unary operator, by calling
the appropriate factory method. |
protected abstract <T> T |
visit(ExpressionVisitor<T> v)
Dispatches to the specific visit method for this node type.
|
protected Expression(int expressionType,
@NonNull
@NonNull Class<?> resultType)
Expression class.expressionType - The ExpressionType to set as the node type.resultType - The Class to set as the type of the expression
that this Expression represents.public static BinaryExpression add(Expression first, Expression second)
BinaryExpression that represents an arithmetic addition
operation that does not have overflow checking.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to Add and the getFirst() and getSecond() methods set
to the specified values.public static BinaryExpression divide(Expression first, Expression second)
BinaryExpression that represents an arithmetic division
operation.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to Divide and the getFirst() and getSecond() methods
set to the specified values.public static BinaryExpression subtract(Expression first, Expression second)
BinaryExpression that represents an arithmetic subtract
operation.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to Subtract and the getFirst() and getSecond() methods
set to the specified values.public static BinaryExpression multiply(Expression first, Expression second)
BinaryExpression that represents an arithmetic multiply
operation.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to Multiply and the getFirst() and getSecond() methods
set to the specified values.public static BinaryExpression modulo(Expression first, Expression second)
BinaryExpression that represents an arithmetic remainder
operation.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to Modulo and the getFirst() and getSecond() methods
set to the specified values.public static BinaryExpression greaterThan(Expression first, Expression second)
BinaryExpression that represents a "greater than" numeric
comparison.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to GreaterThan and the getFirst() and getSecond()
methods set to the specified values.public static BinaryExpression greaterThanOrEqual(Expression first, Expression second)
BinaryExpression that represents a "greater than or equal"
numeric comparison.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to GreaterThanOrEqual and the getFirst() and
getSecond() methods set to the specified values.public static BinaryExpression lessThan(Expression first, Expression second)
BinaryExpression that represents a "less than" numeric
comparison.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to LessThan and the getFirst() and getSecond() methods
set to the specified values.public static BinaryExpression lessThanOrEqual(Expression first, Expression second)
BinaryExpression that represents a "less than or equal"
numeric comparison.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to LessThanOrEqual and the getFirst() and getSecond()
methods set to the specified values.public static BinaryExpression leftShift(Expression first, Expression second)
BinaryExpression that represents an arithmetic left-shift
operation.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to LeftShift and the getFirst() and getSecond()
methods set to the specified values.public static BinaryExpression rightShift(Expression first, Expression second)
BinaryExpression that represents an arithmetic right-shift
operation.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to RightShift and the getFirst() and getSecond()
methods set to the specified values.public static BinaryExpression coalesce(Expression first, Expression second)
BinaryExpression that represents a coalescing operation.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to Coalesce and the getFirst() and getSecond() methods
set to the specified values.public static Expression equal(Expression first, Expression second)
Expression that represents an equality comparison. The
expression will be simplified if one of parameters is constant
Boolean.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType method
equal to Equal and the getFirst() and getSecond() methods set to the
specified values, or one of the parameters if they one of them is
constant Boolean.public static Expression notEqual(Expression first, Expression second)
Expression that represents an inequality comparison. The
expression will be simplified if one of parameters is constant
Boolean.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType method
equal to Equal and the getFirst() and getSecond() methods set to the
specified values, or one of the parameters if they one of them is
constant Boolean.public static Expression logicalAnd(Expression first, Expression second)
Expression that represents a conditional AND operation that
evaluates the second operand only if it has to. The expression will be
simplified if one of parameters is constant.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType method
equal to LogicalAnd and the getFirst() and getSecond() methods set to
the specified values, or one of the parameters if they one of them is
constant.public static BinaryExpression bitwiseAnd(Expression first, Expression second)
BinaryExpression that represents a bitwise AND operation.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType method
equal to BitwiseAnd and the getFirst() and getSecond() properties set
to the specified values.public static Expression logicalOr(Expression first, Expression second)
Expression that represents a conditional OR operation that
evaluates the second operand only if it has to. The expression will be
simplified if one of parameters is constant.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType method
equal to LogicalOr and the getFirst() and getSecond() methods set to
the specified values, or one of the parameters if they one of them is
constant.public static BinaryExpression bitwiseOr(Expression first, Expression second)
BinaryExpression that represents a bitwise OR operation.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType method
equal to BitwiseOr and the getFirst() and getSecond() properties set
to the specified values.public static Expression exclusiveOr(Expression first, Expression second)
BinaryExpression that represents a bitwise XOR operation,
or UnaryExpression that represents a bitwise NOT in case the second
parameter equals to -1.first - An Expression to set the getFirst() method equal to.second - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType method
equal to ExclusiveOr and the getFirst() and getSecond() properties
set to the specified values, or UnaryExpression that
represents a bitwise NOT in case the second parameter equals to -1.public static UnaryExpression arrayLength(Expression array)
UnaryExpression that represents getting the length of an
array.array - An Expression to set the getFirst method equal to.UnaryExpression that has the ExpressionType
property equal to ArrayLength and the getFirst() method set to array.public static BinaryExpression arrayIndex(Expression array, Expression index)
BinaryExpression that represents applying an array index
operator to an array.array - An Expression to set the getFirst method equal to.index - An Expression to set the getSecond method equal to.BinaryExpression that has the ExpressionType method
equal to ArrayIndex and the getFirst() and getSecond() methods set to
the specified values.public static Expression convert(Expression e, Class<?> to)
UnaryExpression that represents a conversion operation, or
'e' if its ResultType equals to 'to'.e - An Expression to set the getFirst() method equal to.to - The Class to set as the type of the expression that this
Expression represents.UnaryExpression that has the ExpressionType
property equal to Convert, or 'e'.public static ConstantExpression constant(Object value, Class<?> resultType)
ConstantExpression that has the getValue() method set to
the specified value and resultType is assignable from its type.value - An Object to set the getValue() method equal to.resultType - The Class to set as the type of the expression that
this Expression represents.ConstantExpression that has the ExpressionType
property equal to Constant and the getValue() method set to the
specified value.public static ConstantExpression constant(Object value)
ConstantExpression that has the getValue() method set to
the specified value.value - An Object to set the getValue() method equal to.ConstantExpression that has the ExpressionType
property equal to Constant and the getValue() method set to the
specified value.public static UnaryExpression negate(Expression e)
UnaryExpression that represents an arithmetic negation
operation.e - An Expression to set the getValue() method equal to.UnaryExpression that has the ExpressionType
property equal to Negate and the getValue() method set to the
specified value.public static ParameterExpression parameter(Class<?> resultType, int index)
ParameterExpression.resultType - The Class to set as the type of the expression that
this Expression represents.index - Parameter index in the method signature.ParameterExpression that has the getExpressionType() method
equal to Parameter and the getResultType() and getIndex() methods set
to the specified values.public static BinaryExpression instanceOf(Expression e, Class<?> type)
BinaryExpression that represents an instanceOf test.e - An Expression to set the getFirst() method equal to.type - The Class that assignability is tested with.BinaryExpression that has the getExpressionType() equal to
InstanceOf, the getFirst() set to 'e' and getSecond() set to
ConstantExpression with value equals to 'type'.public static BinaryExpression instanceOf(Expression e, Expression type)
BinaryExpression that represents an instanceOf test.e - An Expression to set the getFirst() method equal to.type - The Expression that evaluates to Class assignability is
tested with.BinaryExpression that has the getExpressionType() equal to
InstanceOf, the getFirst() set to 'e' and getSecond() set to
ConstantExpression with value equals to 'type'.public static Expression unary(int expressionType, Class<?> resultType, Expression operand)
Expression, given an operand and unary operator, by calling
the appropriate factory method.expressionType - The ExpressionType that specifies the type of
unary operation.resultType - The Class that specifies the type to be
converted to (pass null if not applicable).operand - An Expression that represents the operand.Expression that results from calling the appropriate
factory method.public static Expression binary(int expressionType, Expression first, Expression second)
Expression, given an operand and binary operator, by
calling the appropriate factory method.expressionType - The ExpressionType that specifies the type of
binary operation.first - An Expression that represents the left operand.second - An Expression that represents the right
operand.Expression that results from calling the appropriate
factory method.public static Expression binary(int expressionType, Expression operator, Expression first, Expression second)
Expression, given an operand and binary operator, by
calling the appropriate factory method.expressionType - The ExpressionType that specifies the type of
binary operation.operator - An Expression that represents the operator.first - An Expression that represents the left operand.second - An Expression that represents the right
operand.Expression that results from calling the appropriate
factory method.public static LambdaExpression<?> lambda(Class<?> resultType, Expression body, List<ParameterExpression> parameters, List<Expression> locals, Object key)
LambdaExpression as a method receiving the specified arguments, returning the
resultType and having body for its implementation.resultType - The method return value.body - The method implementation.parameters - The method parameters.locals - The method locals.LambdaExpression as a method receiving the specified arguments, returning the
resultType and having body for its implementation.public static DelegateExpression delegate(Class<?> resultType, Expression delegate, List<ParameterExpression> parameters)
DelegateExpression as a method receiving the specified
arguments, returning the resultType and having delegate to
the implementation.resultType - The method return value.delegate - The method implementation. The delegate resultType must be
InvocableExpression.parameters - The method parameters.DelegateExpression as a method receiving the specified
arguments, returning the resultType and having
delegate to the implementation.public static BlockExpression block(Class<?> resultType, List<Expression> expressions)
BlockExpressionresultType - The result type of the block.expressions - The expressions in the block.BlockExpressionpublic static NewArrayInitExpression newArrayInit(Class<?> type, List<Expression> initializers)
NewArrayInitExpression that represents creating a
one-dimensional array and initializing it from a list of elements.type - Class that represents the component type of the
array.initializers - Expression objects used to populate the array.NewArrayInitExpressionpublic static MemberExpression get(Class<?> type, String name) throws NoSuchFieldException
MemberExpression that represents accessing a static field
given the name of the field.type - The Class that specifies the type that contains the
specified static field.name - The name of a field.InvocationExpression that represents accessing a static
field given the name of the field.NoSuchFieldException - if a field with the specified name is not found.public static MemberExpression get(Expression instance, String name) throws NoSuchFieldException
MemberExpression that represents accessing an instance
field given the name of the field.instance - An Expression whose getResultType() value
will be searched for a specific field.name - The name of a field.InvocationExpression that represents accessing an instance
field given the name of the field.NoSuchFieldException - if a field with the specified name is not found.public static MemberExpression member(int expressionType, Expression instance, Member member, Class<?> resultType, List<ParameterExpression> params)
MemberExpression that accessed the specified member.expressionType - Type of access.instance - An Expression representing the instance.member - The Member to be accessed.resultType - The return value type.params - The parameters.MemberExpression that accessed the specified member.public static MemberExpression get(Expression instance, Field field)
MemberExpression that represents accessing an instance
field.instance - An Expression representing the instance.field - A field to be accessed.InvocationExpression that represents accessing an instance
field.public static Expression invoke(Expression instance, Method method, Expression... arguments)
InvocationExpression that represents a call to an instance
method, or UnaryExpression in case of boxing.instance - An Expression whose getResultType() value
will be searched for a specific method.method - The Method to be called.arguments - An array of Expression objects that represent the
arguments to the method.InvocationExpression that has the ExpressionType
method equal to Invoke or Convert in case of boxing.public static Expression invoke(Expression instance, Method method, List<Expression> arguments)
InvocationExpression that represents a call to an instance
method, or UnaryExpression in case of boxing.instance - An Expression whose getResultType() value
will be searched for a specific method.method - The Method to be called.arguments - An array of Expression objects that represent the
arguments to the method.InvocationExpression that has the ExpressionType
method equal to Invoke or Convert in case of boxing.public static InvocationExpression invoke(InvocableExpression method, Expression... arguments)
InvocationExpression that represents a call to an instance
method.method - An InvocableExpression which encapsulates method to
be called.arguments - An array of Expression objects that represent the
arguments to the method.InvocationExpression that has the ExpressionType
method equal to Invoke.public static InvocationExpression invoke(InvocableExpression method, List<? extends Expression> arguments)
InvocationExpression that represents a call to an instance
method.method - An InvocableExpression which encapsulates method to
be called.arguments - An array of Expression objects that represent the
arguments to the method.InvocationExpression that has the ExpressionType
method equal to Invoke.public static InvocationExpression newInstance(Constructor<?> method, Expression... arguments)
InvocationExpression that represents calling the specified
constructor.method - The constructor to invoke.arguments - The constructor arguments.InvocationExpression that represents calling the specified
constructor.public static InvocationExpression newInstance(Constructor<?> method, List<Expression> arguments)
InvocationExpression that represents calling the specified
constructor.method - The constructor to invoke.arguments - The constructor arguments.InvocationExpression that represents calling the specified
constructor.public static InvocationExpression newInstance(Class<?> type, Class<?>[] argumentTypes, Expression... arguments) throws NoSuchMethodException
InvocationExpression that represents calling the specified
constructor.type - Class to be instantiated.argumentTypes - The Constructor argument types.arguments - The constructor arguments.InvocationExpression that represents calling the specified
constructor.NoSuchMethodException - if a matching method is not found.public static Expression invoke(Expression instance, String name, Class<?>[] parameterTypes, Expression... arguments) throws NoSuchMethodException
InvocationExpression that represents a call to an instance
method by calling the appropriate factory method, or UnaryExpression
in case of boxing.instance - An Expression whose getResultType()
value will be searched for a specific method.name - The name of the method.parameterTypes - An array of Class objects that specify the type
of parameters of the method.arguments - An array of Expression objects that represent
the arguments to the method.InvocationExpression that has the ExpressionType
method equal to Invoke or Convert in case of boxing.NoSuchMethodException - if a matching method is not found.public static Expression invoke(Class<?> type, String name, Class<?>[] parameterTypes, Expression... arguments) throws NoSuchMethodException
InvocationExpression that represents a call to a static
method by calling the appropriate factory method, or UnaryExpression
in case of boxing.type - The Class that specifies the type that contains
the specified static method.name - The name of the method.parameterTypes - An array of Class objects that specify the type
of parameters of the method.arguments - An array of Expression objects that represent
the arguments to the method.InvocationExpression that has the ExpressionType
method equal to Invoke or Convert in case of boxing.NoSuchMethodException - if a matching method is not found.public static Expression condition(Expression test, Expression ifTrue, Expression ifFalse)
BinaryExpression that represents a conditional operation,
or one of operands in case test is a constant.test - An Expression to set the getOperator() method equal to.ifTrue - An Expression to set the getFirst() method equal to.ifFalse - An Expression to set the getSecond() method equal to.BinaryExpression that has the ExpressionType
property equal to Conditional and the getFirst() and getSecond()
methods set to the specified values.public static UnaryExpression isNull(Expression e)
UnaryExpression that represents a test for null operation.e - OperandUnaryExpression that represents a test for null operation.public static UnaryExpression isNonNull(Expression e)
UnaryExpression that represents a test for null operation.e - OperandUnaryExpression that represents a test for null operation.public static UnaryExpression bitwiseNot(Expression e)
UnaryExpression that represents a bitwise complement
operation.e - OperandUnaryExpression that represents a bitwise complement
operation.public static Expression logicalNot(Expression e)
Expression that represents a logical negation operation.e - OperandExpression that represents a logical negation operation.public final <T> T accept(ExpressionVisitor<T> v)
BinaryExpression calls the
ExpressionVisitor.visit(BinaryExpression).T - type the visitor methods return after processing.v - The visitor to visit this node with.protected abstract <T> T visit(ExpressionVisitor<T> v)
BinaryExpression calls the
ExpressionVisitor.visit(BinaryExpression).T - type the visitor methods return after processing.v - The visitor to visit this node with.Copyright © 2023 Streamx. All rights reserved.