Modifier and Type | Field and Description |
---|---|
protected Emitter |
Template.emitter |
Modifier and Type | Method and Description |
---|---|
Emitter |
Template.getEmitter()
Returns the emitter which represents the body of the template.
|
Modifier and Type | Method and Description |
---|---|
void |
Template.setEmitter(Emitter emitter)
Sets the body of the template.
|
Modifier and Type | Method and Description |
---|---|
Emitter |
CompilationContext.inlineTemplate(parsii.tokenizer.Position startOfTag,
Template template,
Function<String,Expression> arguments,
Function<String,Emitter> blocks)
Inlines the requested template into the current one.
|
Emitter |
CompilationContext.invokeTemplate(parsii.tokenizer.Position position,
Template template,
Function<String,Expression> arguments,
Map<String,Emitter> blocks)
Generates an emitter which invokes the given template at runtime.
|
Emitter |
AttributeExpressionHandler.process(Compiler compiler) |
Emitter |
ForHandler.process(Compiler compiler) |
Emitter |
RawHandler.process(Compiler compiler) |
abstract Emitter |
ExpressionHandler.process(Compiler compiler)
Processes the expression initialized by an @ in the source code.
|
Emitter |
IfHandler.process(Compiler compiler) |
Emitter |
EvalExpressionHandler.process(Compiler compiler) |
Modifier and Type | Method and Description |
---|---|
Emitter |
CompilationContext.inlineTemplate(parsii.tokenizer.Position startOfTag,
Template template,
Function<String,Expression> arguments,
Function<String,Emitter> blocks)
Inlines the requested template into the current one.
|
Emitter |
CompilationContext.invokeTemplate(parsii.tokenizer.Position position,
Template template,
Function<String,Expression> arguments,
Map<String,Emitter> blocks)
Generates an emitter which invokes the given template at runtime.
|
Modifier and Type | Class and Description |
---|---|
class |
BlockEmitter
Invokes a given parameter block.
|
class |
CompositeEmitter
Represents a composite emitter which consists of a list of child emitters.
|
class |
ConditionalEmitter
Represents a conditional block which is only emitted if a given expression evaluates to true.
|
class |
ConstantEmitter
Emits a constant text block.
|
class |
DynamicInvokeTemplateEmitter
Invokes and renders a sub template at runtime.
|
class |
ExpressionEmitter
Emits the result of an evaluated expression.
|
class |
ExtraBlockEmitter
Emits the contents of an i:block defined at top-level into an extra block output of the context.
|
class |
InlineTemplateEmitter
Represents an inlined sub emitter to keep the render stack consistent.
|
class |
InvokeTemplateEmitter
Invokes and renders a sub template at runtime.
|
class |
LoopEmitter
Loops over a given
Iterable and invokes the given block for each item within. |
class |
PushLocalEmitter
Writes the result of an expression evaluation into a temporary / local variable.
|
class |
RawEmitter
Switches the escaper to
GlobalRenderContext.escapeRAW(String) while emitting the given body. |
Modifier and Type | Field and Description |
---|---|
protected Emitter |
InlineTemplateEmitter.body |
protected Emitter |
ConditionalEmitter.whenFalse |
protected Emitter |
ConditionalEmitter.whenTrue |
Modifier and Type | Field and Description |
---|---|
protected List<Emitter> |
CompositeEmitter.children |
Modifier and Type | Method and Description |
---|---|
Emitter |
PushLocalEmitter.copy() |
Emitter |
ConstantEmitter.copy()
Creates a copy of the emitter.
|
Emitter |
ConditionalEmitter.copy() |
Emitter |
InvokeTemplateEmitter.copy() |
Emitter |
InlineTemplateEmitter.copy() |
Emitter |
LoopEmitter.copy() |
Emitter |
ExtraBlockEmitter.copy() |
abstract Emitter |
Emitter.copy()
Creates a deep copy of this emitter.
|
Emitter |
DynamicInvokeTemplateEmitter.copy() |
Emitter |
CompositeEmitter.copy() |
Emitter |
BlockEmitter.copy() |
Emitter |
ExpressionEmitter.copy() |
Emitter |
RawEmitter.copy() |
Emitter |
BlockEmitter.getAlternative()
Returns the alternative to evaluate if no block with the given name is available.
|
Emitter |
PushLocalEmitter.propagateVisitor(EmitterVisitor visitor) |
Emitter |
ConstantEmitter.propagateVisitor(EmitterVisitor visitor) |
Emitter |
ConditionalEmitter.propagateVisitor(EmitterVisitor visitor) |
Emitter |
InvokeTemplateEmitter.propagateVisitor(EmitterVisitor visitor) |
Emitter |
InlineTemplateEmitter.propagateVisitor(EmitterVisitor visitor) |
Emitter |
LoopEmitter.propagateVisitor(EmitterVisitor visitor) |
Emitter |
ExtraBlockEmitter.propagateVisitor(EmitterVisitor visitor) |
abstract Emitter |
Emitter.propagateVisitor(EmitterVisitor visitor)
Invokes the visitor on all sub emitters and on this emitter itself.
|
Emitter |
DynamicInvokeTemplateEmitter.propagateVisitor(EmitterVisitor visitor) |
Emitter |
CompositeEmitter.propagateVisitor(EmitterVisitor visitor) |
Emitter |
BlockEmitter.propagateVisitor(EmitterVisitor visitor) |
Emitter |
ExpressionEmitter.propagateVisitor(EmitterVisitor visitor) |
Emitter |
RawEmitter.propagateVisitor(EmitterVisitor visitor) |
Emitter |
PushLocalEmitter.reduce() |
Emitter |
ConstantEmitter.reduce() |
Emitter |
ConditionalEmitter.reduce()
Reduces the condition as well as the true and false blocks.
|
Emitter |
InvokeTemplateEmitter.reduce() |
Emitter |
InlineTemplateEmitter.reduce() |
Emitter |
LoopEmitter.reduce() |
Emitter |
ExtraBlockEmitter.reduce() |
abstract Emitter |
Emitter.reduce()
Performs static optimizations at compile time.
|
Emitter |
DynamicInvokeTemplateEmitter.reduce() |
Emitter |
CompositeEmitter.reduce()
Tries to optimize the list of child emitters.
|
Emitter |
BlockEmitter.reduce() |
Emitter |
ExpressionEmitter.reduce()
Reduces the internal expression.
|
Emitter |
RawEmitter.reduce() |
Emitter |
EmitterVisitor.visitThis(Emitter emitter)
Invoked for each emitter.
|
Modifier and Type | Method and Description |
---|---|
void |
CompositeEmitter.addChild(Emitter child)
Adds a new child emitter and the end of the children list.
|
void |
LoopEmitter.setLoop(Emitter loop)
Sets the body to emit once per item in the list of items to output.
|
void |
ConditionalEmitter.setWhenFalse(Emitter whenFalse)
Specifies the block to emit if the condition evaluates to false.
|
void |
ConditionalEmitter.setWhenTrue(Emitter whenTrue)
Specifies the block to emit if the condition evaluates to true.
|
Emitter |
EmitterVisitor.visitThis(Emitter emitter)
Invoked for each emitter.
|
Modifier and Type | Method and Description |
---|---|
void |
InvokeTemplateEmitter.setBlocks(Map<String,Emitter> blocks)
Sets the blocks to be applied, which can be referenced by the invoked template.
|
Constructor and Description |
---|
BlockEmitter(parsii.tokenizer.Position startOfBlock,
String name,
Emitter alternative)
Creates a new emitter which outputs the given block parameter at runtime or evaluates the given alternative.
|
ExtraBlockEmitter(String name,
Emitter body)
Creates a new instance with the given name and body.
|
InlineTemplateEmitter(parsii.tokenizer.Position startOfBlock,
Template template,
Emitter body)
Creates a new instance at the given position, which references the given template and wraps the given body.
|
RawEmitter(parsii.tokenizer.Position startOfBlock,
Emitter body)
Creates a new instance for the given position and body.
|
Constructor and Description |
---|
DynamicInvokeTemplateEmitter(parsii.tokenizer.Position startOfBlock,
Expression templateName,
Map<String,Expression> args,
Map<String,Emitter> blocks)
Creates a new instance at the given position with the given target template.
|
Modifier and Type | Method and Description |
---|---|
Expression |
MacroCall.dereference(Template template,
Function<String,Emitter> blocks)
Transforms all macros that access blocks of the
LocalRenderContext into alternative expressions. |
Modifier and Type | Method and Description |
---|---|
Expression |
RenderBlockMacro.dereference(Template template,
Function<String,Emitter> blocks,
Expression[] args) |
default Expression |
Macro.dereference(Template template,
Function<String,Emitter> blocks,
Expression[] args)
Replaces the call to this macro by an alternative expression if blocks are to be inlined.
|
Modifier and Type | Method and Description |
---|---|
void |
LocalRenderContext.setBlocks(LocalRenderContext context,
Map<String,Emitter> blocks)
Specifies the blocks made available by the caller.
|
Modifier and Type | Field and Description |
---|---|
protected Map<String,Emitter> |
TagHandler.blocks |
Modifier and Type | Method and Description |
---|---|
Emitter |
TagHandler.getBlock(String name)
Fetches a block passed to the tag
|
Modifier and Type | Method and Description |
---|---|
void |
TagHandler.addBlock(String name,
Emitter body)
Adds a block of emitters being passed to the template.
|
Copyright © 2018. All rights reserved.