Interface ExpressionWriter
- All Known Implementing Classes:
AbstractStatementAwareExpressionWriter
public sealed interface ExpressionWriter
permits AbstractStatementAwareExpressionWriter (not exhaustive)
The expression writer.
- Since:
- 1.5
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressionWriterof(ExpressionDef expressionDef) Create a writer from an expression.voidwrite(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, MethodContext context) Write the expression.static voidwriteExpression(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, MethodContext context, ExpressionDef expressionDef) static voidwriteExpressionCheckCast(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, MethodContext context, ExpressionDef expressionDef, TypeDef expectedType) static voidwriteInvocation(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, MethodContext context, InvocationPlan plan) Writes the arguments of an invocation, converted to the parameters it plans, and emits it and the conversion of its result.
-
Method Details
-
of
Create a writer from an expression.- Parameters:
expressionDef- The expression- Returns:
- the writer
-
writeExpression
static void writeExpression(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, MethodContext context, ExpressionDef expressionDef) -
writeExpressionCheckCast
static void writeExpressionCheckCast(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, MethodContext context, ExpressionDef expressionDef, TypeDef expectedType) -
writeInvocation
static void writeInvocation(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, MethodContext context, InvocationPlan plan) Writes the arguments of an invocation, converted to the parameters it plans, and emits it and the conversion of its result. The receiver, if any, is written first by the caller as the plan says.- Parameters:
generatorAdapter- The adaptercontext- The method contextplan- The invocation- Since:
- 2.3
-
write
Write the expression.- Parameters:
generatorAdapter- The adaptercontext- The method context
-