public class MacroCall extends Call
Macro at runtime.NO_ARGS, parameterExpressions| Constructor and Description |
|---|
MacroCall() |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(parsii.tokenizer.Position position,
CompilationContext context,
String macroName)
Actually tells the macro to try to resolve an appropriate
Macro to invoke. |
Expression |
copy()
Creates a deep copy of the expression which can be modified without affecting the original expression.
|
Expression |
dereference(Template template,
Function<String,Emitter> blocks)
Transforms all macros that access blocks of the
LocalRenderContext into alternative expressions. |
Object |
eval(LocalRenderContext ctx)
Evaluates the expression into an object using the given context.
|
Class<?> |
getType()
Returns the Java class of the objects yielded by this expression.
|
boolean |
isConstant()
Determines if the expression is constant.
|
Expression |
reduce()
Reduces and optimizes the expression if possible.
|
String |
toString() |
void |
verify()
Permits the marco to verify its parameters.
|
copyParametersTo, propagateVisitor, setParameterspublic Expression copy()
Expressionpublic Expression reduce()
Expressionpublic boolean isConstant()
ExpressionisConstant in interface ExpressionisConstant in class Callpublic Object eval(LocalRenderContext ctx)
Expressionctx - the current rendering contextpublic Class<?> getType()
Expressionpublic void bind(parsii.tokenizer.Position position,
CompilationContext context,
String macroName)
Macro to invoke.position - the current position, used for error reportscontext - the compilation contextmacroName - the name of the macropublic void verify()
If one or more arguments are invalid an IllegalArgumentException can be thrown.
public Expression dereference(Template template, Function<String,Emitter> blocks)
LocalRenderContext into alternative expressions.template - the template for which the blocks are dereferencedblocks - the provider to resolve a block name into an EmitterCopyright © 2018. All rights reserved.