Package com.strobel.expressions
Class LambdaExpression<T>
java.lang.Object
com.strobel.expressions.Expression
com.strobel.expressions.LambdaExpression<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Expression
private Class
<?> private final String
private final ParameterExpressionList
private final Type
private final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionLambdaExpression
(Type<T> interfaceType, String name, Expression body, boolean tailCall, ParameterExpressionList parameters) -
Method Summary
Modifier and TypeMethodDescriptionprotected Expression
accept
(ExpressionVisitor visitor) Dispatches to the specific visit method for this node type.(package private) final LambdaExpression
<T> accept
(StackSpiller spiller) final T
compile()
final MethodHandle
final void
compileToMethod
(MethodBuilder methodBuilder) final MethodInfo
compileToMethod
(TypeBuilder<?> typeBuilder) final MethodInfo
compileToMethod
(TypeBuilder<?> typeBuilder, String name) final MethodInfo
compileToMethod
(TypeBuilder<?> typeBuilder, String name, int modifiers) final Expression
getBody()
(package private) final Class
<?> final String
getName()
Returns the node type of thisExpression
.final ParameterExpressionList
final Type
getType()
Gets the static type of the expression that thisExpression
represents.final boolean
private static <T> Type
<T> resolveDelegateType
(Expression body, ParameterExpressionList parameters) final LambdaExpression
<T> update
(Expression body, ParameterExpressionList parameters) Methods inherited from class com.strobel.expressions.Expression
add, add, addAssign, addAssign, addAssign, and, and, andAlso, andAlso, andAlso, andAssign, andAssign, andAssign, arrayIndex, arrayLength, arrayToList, arrayToList, arrayToReadOnlyList, assign, base, block, block, block, block, block, block, block, block, block, block, block, block, block, block, box, call, call, call, call, call, call, call, call, call, call, canReduce, classConstant, coalesce, coalesce, concat, concat, concat, condition, condition, constant, constant, convert, convert, decrement, decrement, defaultValue, divide, divide, divideAssign, divideAssign, divideAssign, empty, ensureUnmodifiable, equal, equal, exclusiveOr, exclusiveOr, exclusiveOrAssign, exclusiveOrAssign, exclusiveOrAssign, field, field, field, field, forEach, forEach, forEach, getDebugView, getInvokeMethod, getInvokeMethod, getMethodValidated, greaterThan, greaterThan, greaterThanOrEqual, greaterThanOrEqual, ifThen, ifThenElse, increment, increment, instanceOf, invoke, invoke, isFalse, isFalse, isNotNull, isNull, isTrue, isTrue, label, label, label, label, label, label, lambda, lambda, lambda, lambda, lambda, lambda, lambda, lambda, lambda, lambda, lambda, lambda, lambda, leftShift, leftShift, leftShiftAssign, leftShiftAssign, leftShiftAssign, lessThan, lessThan, lessThanOrEqual, lessThanOrEqual, loop, loop, loop, makeBinary, makeBinary, makeBinary, makeBinary, makeBinary, makeBreak, makeBreak, makeBreak, makeBreak, makeCatch, makeCatch, makeCatch, makeCatch, makeCatch, makeCatch, makeContinue, makeContinue, makeFor, makeFor, makeFor, makeGoto, makeGoto, makeGoto, makeGoto, makeGoto, makeMemberAccess, makeNew, makeNew, makeNew, makeNew, makeReturn, makeReturn, makeReturn, makeReturn, makeSwitch, makeSwitch, makeSwitch, makeSwitch, makeSwitch, makeSwitch, makeSwitch, makeSwitch, makeSwitch, makeSwitch, makeSwitch, makeSwitch, makeSwitch, makeThrow, makeThrow, makeTry, makeTry, makeTry, makeUnary, makeUnary, methodArgumentsMatch, modulo, modulo, moduloAssign, moduloAssign, moduloAssign, multiply, multiply, multiplyAssign, multiplyAssign, multiplyAssign, negate, negate, newArrayBounds, newArrayInit, newArrayInit, not, not, notEqual, notEqual, onesComplement, onesComplement, or, or, orAssign, orAssign, orAssign, orElse, orElse, orElse, parameter, parameter, parameterIsAssignable, parameters, performBinaryNumericPromotion, postDecrementAssign, postDecrementAssign, postIncrementAssign, postIncrementAssign, preDecrementAssign, preDecrementAssign, preIncrementAssign, preIncrementAssign, reduce, reduceAndCheck, reduceExtensions, referenceEqual, referenceNotEqual, returnObject, rightShift, rightShift, rightShiftAssign, rightShiftAssign, rightShiftAssign, runtimeVariables, runtimeVariables, self, subtract, subtract, subtractAssign, subtractAssign, subtractAssign, switchCase, switchCase, toString, tryCatch, tryCatchFinally, tryFinally, typeEqual, unaryPlus, unaryPlus, unbox, unbox, unsignedRightShift, unsignedRightShift, unsignedRightShiftAssign, unsignedRightShiftAssign, unsignedRightShiftAssign, validateVariables, variable, variable, variables, visitChildren
-
Field Details
-
_name
-
_body
-
_parameters
-
_interfaceType
-
_tailCall
private final boolean _tailCall -
_returnType
-
_creationContext
-
-
Constructor Details
-
LambdaExpression
LambdaExpression(Type<T> interfaceType, String name, Expression body, boolean tailCall, ParameterExpressionList parameters)
-
-
Method Details
-
resolveDelegateType
-
getType
Description copied from class:Expression
Gets the static type of the expression that thisExpression
represents.- Overrides:
getType
in classExpression
- Returns:
- the
Type
that represents the static type of the expression.
-
getNodeType
Description copied from class:Expression
Returns the node type of thisExpression
.- Overrides:
getNodeType
in classExpression
- Returns:
- the
ExpressionType
that represents this expression.
-
getName
-
getBody
-
getParameters
-
getReturnType
-
isTailCall
public final boolean isTailCall() -
update
-
accept
Description copied from class:Expression
Dispatches to the specific visit method for this node type. For example,BinaryExpression
will call intoExpressionVisitor.visitBinary()
.- Overrides:
accept
in classExpression
- Parameters:
visitor
- the visitor to visit this node.- Returns:
- the result of visiting this node.
-
accept
-
getCreationContext
-
compile
-
compileDelegate
-
compileHandle
-
compileToMethod
-
compileToMethod
-
compileToMethod
-
compileToMethod
-