Package | Description |
---|---|
sirius.tagliatelle | |
sirius.tagliatelle.compiler | |
sirius.tagliatelle.emitter | |
sirius.tagliatelle.expression | |
sirius.tagliatelle.macros | |
sirius.tagliatelle.tags |
Modifier and Type | Method and Description |
---|---|
Expression |
TemplateArgument.getDefaultValue()
Returns the default value.
|
Constructor and Description |
---|
TemplateArgument(Class<?> type,
String name,
String description,
Expression defaultValue,
String deprecationWarning)
Creates a new argument with the given type, name and default expression.
|
Modifier and Type | Method and Description |
---|---|
Expression |
Compiler.parseExpression(boolean skipWhitespaces)
Parses an expression.
|
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 | Field and Description |
---|---|
protected Expression |
ConditionalEmitter.conditionExpression |
Modifier and Type | Method and Description |
---|---|
Expression |
PushLocalEmitter.getExpression()
Contains the expression to evaluate and save to the stack location.
|
Expression |
LoopEmitter.getIterableExpression()
Returns the expression which yields the items to iterate through.
|
Modifier and Type | Method and Description |
---|---|
void |
InvokeTemplateEmitter.setArguments(Expression[] args)
Sets the argument expressions for the template invocation.
|
void |
ConditionalEmitter.setConditionExpression(Expression conditionExpression)
Specifies the expression to evaluate to determine which block to emit.
|
void |
LoopEmitter.setIterableExpression(Expression iterableExpression)
Specifies the expression to evaluate which yields the items to iterate over.
|
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.
|
ExpressionEmitter(parsii.tokenizer.Position startOfBlock,
Expression expression)
Creates a new instance at the given position with the given expression.
|
PushLocalEmitter(parsii.tokenizer.Position startOfBlock,
int localIndex,
Expression expression)
Creates a new instance at the given position which writes the value of the given expression into the given local
location.
|
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 | Class and Description |
---|---|
class |
AndOperation
Represents a boolean and.
|
class |
BooleanOperation
Represents a binary operation on boolean types.
|
class |
Call
Represents an invocation with parameters.
|
class |
ConcatExpression
Resprents a string concatenation operation.
|
class |
ConstantBoolean
Represents a constant boolean value.
|
class |
ConstantClass
Represents a constant class value
|
class |
ConstantEnum
Represents an enum constant.
|
class |
ConstantExpression
Represents a constant expression.
|
class |
ConstantInt
Represents a constant integer number.
|
class |
ConstantNull
Represents null as expression.
|
class |
ConstantString
Represents a constant string value.
|
class |
EqualsOperation
Creates a == (in terms of
Object.equals(Object) ) operation. |
class |
InstanceCheck
Represents an instanceof check.
|
class |
IntOperation
Represents an operation on integer values.
|
class |
MacroCall
Invokes a
Macro at runtime. |
class |
MethodCall
Invokes a Java Method.
|
class |
NativeCast
Represents a native (Java) cast operation to provide a type information at compile time.
|
class |
Negation
Represents a boolean and.
|
class |
NoodleOperation
Represents the noodle operation.
|
class |
OrOperation
Represents a boolean or.
|
class |
ReadGlobal
Performs a read in the environment list.
|
class |
ReadLocal
Performs a read on the local stack.
|
class |
RelationalIntOperation
Represents a relational operation on integer values.
|
class |
RenderEmitterExpression
Returns the render result of an emitter as string.
|
class |
TenaryOperation
Represents a tenary operation liek {@code condition ?
|
class |
TransformerCast
Invokes
Transformable.as(Class) on the given selfExpression and also provides the expected type at
compile time. |
Modifier and Type | Field and Description |
---|---|
protected Expression |
TenaryOperation.conditionExpression |
protected Expression |
RelationalIntOperation.leftExpression |
protected Expression |
EqualsOperation.leftExpression |
protected Expression |
BooleanOperation.leftExpression |
protected Expression |
IntOperation.leftExpression |
protected Expression |
NoodleOperation.leftExpression |
protected Expression |
TenaryOperation.leftExpression |
static Expression[] |
Call.NO_ARGS
A placeholder to represent "no arguments", which is preferred over null or creating an empty array each
time.
|
protected Expression[] |
Call.parameterExpressions |
protected Expression |
RelationalIntOperation.rightExpression |
protected Expression |
EqualsOperation.rightExpression |
protected Expression |
BooleanOperation.rightExpression |
protected Expression |
IntOperation.rightExpression |
protected Expression |
NoodleOperation.rightExpression |
protected Expression |
TenaryOperation.rightExpression |
Modifier and Type | Method and Description |
---|---|
Expression |
ReadGlobal.copy() |
Expression |
OrOperation.copy() |
Expression |
InstanceCheck.copy() |
Expression |
ConcatExpression.copy() |
Expression |
RelationalIntOperation.copy() |
Expression |
AndOperation.copy() |
Expression |
EqualsOperation.copy() |
Expression |
NativeCast.copy() |
Expression |
Negation.copy() |
Expression |
Expression.copy()
Creates a deep copy of the expression which can be modified without affecting the original expression.
|
Expression |
MethodCall.copy() |
Expression |
RenderEmitterExpression.copy() |
Expression |
ReadLocal.copy() |
Expression |
ConstantExpression.copy() |
Expression |
IntOperation.copy() |
Expression |
NoodleOperation.copy() |
Expression |
MacroCall.copy() |
Expression |
TenaryOperation.copy() |
Expression |
TransformerCast.copy() |
Expression |
MacroCall.dereference(Template template,
Function<String,Emitter> blocks)
Transforms all macros that access blocks of the
LocalRenderContext into alternative expressions. |
Expression |
ReadGlobal.propagateVisitor(ExpressionVisitor visitor) |
Expression |
InstanceCheck.propagateVisitor(ExpressionVisitor visitor) |
Expression |
ConcatExpression.propagateVisitor(ExpressionVisitor visitor) |
Expression |
RelationalIntOperation.propagateVisitor(ExpressionVisitor visitor) |
Expression |
Call.propagateVisitor(ExpressionVisitor visitor) |
Expression |
EqualsOperation.propagateVisitor(ExpressionVisitor visitor) |
Expression |
NativeCast.propagateVisitor(ExpressionVisitor visitor) |
Expression |
Negation.propagateVisitor(ExpressionVisitor visitor) |
Expression |
BooleanOperation.propagateVisitor(ExpressionVisitor visitor) |
Expression |
Expression.propagateVisitor(ExpressionVisitor visitor)
Visits all child nodes and then the node itself.
|
Expression |
MethodCall.propagateVisitor(ExpressionVisitor visitor) |
Expression |
RenderEmitterExpression.propagateVisitor(ExpressionVisitor visitor) |
Expression |
ReadLocal.propagateVisitor(ExpressionVisitor visitor) |
Expression |
ConstantExpression.propagateVisitor(ExpressionVisitor visitor) |
Expression |
IntOperation.propagateVisitor(ExpressionVisitor visitor) |
Expression |
NoodleOperation.propagateVisitor(ExpressionVisitor visitor) |
Expression |
TenaryOperation.propagateVisitor(ExpressionVisitor visitor) |
Expression |
TransformerCast.propagateVisitor(ExpressionVisitor visitor) |
Expression |
ReadGlobal.reduce() |
Expression |
OrOperation.reduce() |
Expression |
InstanceCheck.reduce() |
Expression |
ConcatExpression.reduce()
Tries to optimize the expression by pre-concatenating adjacent constant operands.
|
Expression |
RelationalIntOperation.reduce() |
Expression |
AndOperation.reduce() |
Expression |
EqualsOperation.reduce() |
Expression |
NativeCast.reduce() |
Expression |
Negation.reduce() |
Expression |
BooleanOperation.reduce() |
Expression |
Expression.reduce()
Reduces and optimizes the expression if possible.
|
Expression |
MethodCall.reduce() |
Expression |
RenderEmitterExpression.reduce() |
Expression |
ReadLocal.reduce() |
Expression |
ConstantExpression.reduce() |
Expression |
IntOperation.reduce() |
Expression |
NoodleOperation.reduce() |
Expression |
MacroCall.reduce() |
Expression |
TenaryOperation.reduce() |
Expression |
TransformerCast.reduce() |
Expression |
ExpressionVisitor.visitThis(Expression expression)
Invoked for each node of an expression AST.
|
Modifier and Type | Method and Description |
---|---|
void |
ConcatExpression.add(Expression expr) |
protected boolean |
BooleanOperation.eval(Expression expr,
LocalRenderContext ctx)
Evaluates the operation into a boolean.
|
Expression |
ExpressionVisitor.visitThis(Expression expression)
Invoked for each node of an expression AST.
|
Modifier and Type | Method and Description |
---|---|
void |
Call.setParameters(List<Expression> parameters)
Applies the parameters to evaluate and pass the to invocation.
|
Constructor and Description |
---|
AndOperation(Expression leftExpression,
Expression rightExpression)
Creates a new and operation for the given operands.
|
BooleanOperation(Expression leftExpression,
Expression rightExpression)
Creates a new operation for the given operands.
|
ConcatExpression(Expression... expressions)
Creates a new string concatenation for the given expressions
|
EqualsOperation(Expression leftExpression,
Expression rightExpression,
boolean invert)
Creates a new operation for the given operands.
|
InstanceCheck(Expression selfExpression,
Class<?> type)
Creates a new instanceof for the given expression with the given type.
|
IntOperation(Operator operator,
Expression leftExpression,
Expression rightExpression)
Creates a new operation with the given operator and operands.
|
MethodCall(Expression self)
Creates a new instance and specifies the expression on which the method is invoked.
|
NativeCast(Expression selfExpression,
Class<?> type)
Creates a new cast for the given expression with the given type.
|
Negation(Expression expresion) |
NoodleOperation(Expression leftExpression,
Expression rightExpression)
Creates a new operation for the given operands.
|
OrOperation(Expression leftExpression,
Expression rightExpression)
Creates a new or operation for the given operands.
|
RelationalIntOperation(Operator operator,
Expression leftExpression,
Expression rightExpression)
Creates a new instance for the given operator and operands.
|
TenaryOperation(Expression conditionExpression,
Expression leftExpression,
Expression rightExpression)
Creates a new instance for the given condition and expressions.
|
TransformerCast(Expression selfExpression,
Class<?> type)
Creates a new invokation and compile time cast for the given expression with the given type.
|
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 |
---|---|
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.
|
Object |
LimitMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
I18nMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
ToUserStringMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
FormatMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
SplitAtLastMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
JSONMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
IsFrameworkEnabledMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
LeftPadMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
DateComparingMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
InlineResourceMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
EnumValuesMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
RenderBlockMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
EscapeJSMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
SplitMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
Macro.eval(LocalRenderContext ctx,
Expression[] args)
Evaluates the macro at runtime.
|
Object |
ToSpokenDateMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
RightPadMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
ApplyMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
UrlEncodeMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
IsFilledMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
FormatDateMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
JoinMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
ToMachineStringMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
MonthNameMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
ToListMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
FormatSizeMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
FormatTimeMacro.eval(LocalRenderContext ctx,
Expression[] args) |
Object |
XMLMacro.eval(LocalRenderContext ctx,
Expression[] args) |
boolean |
LimitMacro.isConstant(Expression[] args) |
boolean |
I18nMacro.isConstant(Expression[] args) |
boolean |
ToUserStringMacro.isConstant(Expression[] args) |
boolean |
FormatMacro.isConstant(Expression[] args) |
boolean |
SplitAtLastMacro.isConstant(Expression[] args) |
boolean |
JSONMacro.isConstant(Expression[] args) |
boolean |
IsFrameworkEnabledMacro.isConstant(Expression[] args) |
boolean |
LeftPadMacro.isConstant(Expression[] args) |
boolean |
DateComparingMacro.isConstant(Expression[] args) |
boolean |
InlineResourceMacro.isConstant(Expression[] args) |
boolean |
EnumValuesMacro.isConstant(Expression[] args) |
boolean |
RenderBlockMacro.isConstant(Expression[] args) |
boolean |
EscapeJSMacro.isConstant(Expression[] args) |
boolean |
SplitMacro.isConstant(Expression[] args) |
boolean |
Macro.isConstant(Expression[] args)
Determines if the macro is "constant" for the given parameter expressions.
|
boolean |
ToSpokenDateMacro.isConstant(Expression[] args) |
boolean |
RightPadMacro.isConstant(Expression[] args) |
boolean |
ApplyMacro.isConstant(Expression[] args) |
boolean |
UrlEncodeMacro.isConstant(Expression[] args) |
boolean |
IsFilledMacro.isConstant(Expression[] args) |
boolean |
FormatDateMacro.isConstant(Expression[] args) |
boolean |
JoinMacro.isConstant(Expression[] args) |
boolean |
ToMachineStringMacro.isConstant(Expression[] args) |
boolean |
MonthNameMacro.isConstant(Expression[] args) |
boolean |
ToListMacro.isConstant(Expression[] args) |
boolean |
FormatSizeMacro.isConstant(Expression[] args) |
boolean |
FormatTimeMacro.isConstant(Expression[] args) |
boolean |
XMLMacro.isConstant(Expression[] args) |
Modifier and Type | Method and Description |
---|---|
void |
LimitMacro.verifyArguments(List<Expression> args) |
void |
I18nMacro.verifyArguments(List<Expression> args)
Verifies the argument type.
|
void |
ToUserStringMacro.verifyArguments(List<Expression> args) |
void |
FormatMacro.verifyArguments(List<Expression> args) |
void |
SplitAtLastMacro.verifyArguments(List<Expression> args) |
void |
JSONMacro.verifyArguments(List<Expression> args) |
void |
IsFrameworkEnabledMacro.verifyArguments(List<Expression> args) |
void |
LeftPadMacro.verifyArguments(List<Expression> args) |
void |
DateComparingMacro.verifyArguments(List<Expression> args) |
void |
InlineResourceMacro.verifyArguments(List<Expression> args) |
void |
EnumValuesMacro.verifyArguments(List<Expression> args) |
void |
RenderBlockMacro.verifyArguments(List<Expression> args) |
void |
EscapeJSMacro.verifyArguments(List<Expression> args) |
void |
SplitMacro.verifyArguments(List<Expression> args) |
void |
Macro.verifyArguments(List<Expression> args)
Verifies the arguments.
|
void |
ToSpokenDateMacro.verifyArguments(List<Expression> args) |
void |
RightPadMacro.verifyArguments(List<Expression> args) |
void |
ApplyMacro.verifyArguments(List<Expression> args) |
void |
UrlEncodeMacro.verifyArguments(List<Expression> args) |
void |
IsFilledMacro.verifyArguments(List<Expression> args) |
void |
FormatDateMacro.verifyArguments(List<Expression> args) |
void |
JoinMacro.verifyArguments(List<Expression> args) |
void |
ToMachineStringMacro.verifyArguments(List<Expression> args) |
void |
MonthNameMacro.verifyArguments(List<Expression> args) |
void |
ToListMacro.verifyArguments(List<Expression> args) |
void |
FormatSizeMacro.verifyArguments(List<Expression> args) |
void |
FormatTimeMacro.verifyArguments(List<Expression> args) |
void |
XMLMacro.verifyArguments(List<Expression> args) |
Modifier and Type | Field and Description |
---|---|
protected Map<String,Expression> |
TagHandler.attributes |
Modifier and Type | Method and Description |
---|---|
Expression |
TagHandler.getAttribute(String name)
Fetches the attribute with the given name.
|
Modifier and Type | Method and Description |
---|---|
void |
TagHandler.setAttribute(String name,
Expression expression)
Specifies an attribute.
|
Copyright © 2018. All rights reserved.