Modifier and Type | Method and Description |
---|---|
static java.lang.String |
EventHandlerUtil.includeEvent(RuntimeServices rsvc,
InternalContextAdapter context,
java.lang.String includeResourcePath,
java.lang.String currentResourcePath,
java.lang.String directiveName)
Called when an include-type directive is encountered (#include or
#parse).
|
static java.lang.Object |
EventHandlerUtil.invalidGetMethod(RuntimeServices rsvc,
InternalContextAdapter context,
java.lang.String reference,
java.lang.Object object,
java.lang.String property,
Info info)
Called when an invalid get method is encountered.
|
static java.lang.Object |
EventHandlerUtil.invalidMethod(RuntimeServices rsvc,
InternalContextAdapter context,
java.lang.String reference,
java.lang.Object object,
java.lang.String method,
Info info)
Called when an invalid method is encountered.
|
static void |
EventHandlerUtil.invalidSetMethod(RuntimeServices rsvc,
InternalContextAdapter context,
java.lang.String leftreference,
java.lang.String rightreference,
Info info)
Called when an invalid set method is encountered.
|
static java.lang.Object |
EventHandlerUtil.methodException(RuntimeServices rsvc,
InternalContextAdapter context,
java.lang.Class<?> claz,
java.lang.String method,
java.lang.Exception e,
Info info)
Called when a method exception is generated during Velocity merge.
|
java.lang.Object |
EventCartridge.referenceInsert(InternalContextAdapter context,
java.lang.String reference,
java.lang.Object value)
Call reference insertion handlers
|
static java.lang.Object |
EventHandlerUtil.referenceInsert(RuntimeServices rsvc,
InternalContextAdapter context,
java.lang.String reference,
java.lang.Object value)
Called before a reference is inserted.
|
Modifier and Type | Class and Description |
---|---|
class |
ChainedInternalContextAdapter
This is an abstract internal-use-only context implementation to be
used as a subclass for other internal-use-only contexts that wrap
other internal-use-only contexts.
|
class |
InternalContextAdapterImpl
This adapter class is the container for all context types for internal
use.
|
Modifier and Type | Field and Description |
---|---|
protected InternalContextAdapter |
ChainedInternalContextAdapter.wrappedContext
the parent context
|
Modifier and Type | Method and Description |
---|---|
InternalContextAdapter |
InternalWrapperContext.getBaseContext()
Returns the base full context impl.
|
InternalContextAdapter |
InternalContextAdapterImpl.getBaseContext()
Returns the base context that we are
wrapping.
|
InternalContextAdapter |
ChainedInternalContextAdapter.getBaseContext() |
Constructor and Description |
---|
ChainedInternalContextAdapter(InternalContextAdapter inner)
CTOR, wraps an ICA
|
Modifier and Type | Method and Description |
---|---|
boolean |
Renderable.render(InternalContextAdapter context,
java.io.Writer writer) |
Modifier and Type | Field and Description |
---|---|
private InternalContextAdapter |
Block.Reference.context |
Modifier and Type | Method and Description |
---|---|
protected void |
VelocimacroProxy.checkDepth(InternalContextAdapter context)
check that we aren't already at the max call depth and throws
a MacroOverflowException if we are there.
|
protected void |
Foreach.clean(InternalContextAdapter context,
java.lang.Object o) |
protected java.lang.String |
InputBase.getInputEncoding(InternalContextAdapter context)
Decides the encoding used during input processing of this
directive.
|
protected java.lang.Object[] |
VelocimacroProxy.handleArgValues(InternalContextAdapter context,
Node node,
int callArgNum)
Gets the macro argument values and puts them in the context under
the argument names.
|
protected java.lang.String |
Block.id(InternalContextAdapter context)
Creates a string identifying the source and location of the block
definition, and the current template being rendered if that is
different.
|
void |
Directive.init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
How this directive is to be initialized.
|
void |
Parse.init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
Init's the #parse directive.
|
void |
Stop.init(RuntimeServices rs,
InternalContextAdapter context,
Node node) |
void |
Define.init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
simple init - get the key
|
void |
Include.init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
simple init - init the tree and get the elementKey from
the AST
|
void |
Foreach.init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
simple init - init the tree and get the elementKey from
the AST
|
void |
Evaluate.init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
Initialize and check arguments.
|
void |
Block.init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
simple init - get the key
|
void |
Macro.init(RuntimeServices rs,
InternalContextAdapter context,
Node node) |
void |
Break.init(RuntimeServices rs,
InternalContextAdapter context,
Node node) |
void |
BlockMacro.init(RuntimeServices rs,
java.lang.String macroName,
InternalContextAdapter context,
Node node)
Initializes the directive.
|
void |
RuntimeMacro.init(RuntimeServices rs,
java.lang.String name,
InternalContextAdapter context,
Node node)
Initialize the Runtime macro.
|
protected void |
Directive.postRender(InternalContextAdapter context)
This cleans up any scope control for this directive after rendering,
assuming the scope control was turned on.
|
protected void |
Directive.preRender(InternalContextAdapter context)
This creates and places the scope control for this directive
into the context (if scope provision is turned on).
|
protected void |
Foreach.put(InternalContextAdapter context,
java.lang.String key,
java.lang.Object value)
Extension hook to allow subclasses to control whether loop vars
are set locally or not.
|
boolean |
Block.render(InternalContextAdapter context,
java.io.Writer writer)
renders block directive
|
boolean |
Block.Reference.render(InternalContextAdapter context,
java.io.Writer writer)
Render the AST of this block into the writer using the context.
|
boolean |
VelocimacroProxy.render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
Render the macro AST node
|
abstract boolean |
Directive.render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
How this directive is to be rendered
|
boolean |
Parse.render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
iterates through the argument list and renders every
argument that is appropriate.
|
boolean |
Stop.render(InternalContextAdapter context,
java.io.Writer writer,
Node node) |
boolean |
Define.render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
directive.render() simply makes an instance of the Block inner class
and places it into the context as indicated.
|
boolean |
BlockMacro.render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
Renders content using the selected macro and the passed AST body.
|
boolean |
Include.render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
iterates through the argument list and renders every
argument that is appropriate.
|
boolean |
Foreach.render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
renders the #foreach() block
|
boolean |
Evaluate.render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
Evaluate the argument, convert to a String, and evaluate again
(with the same context).
|
boolean |
RuntimeMacro.render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
Velocimacro implementation is not known at the init time.
|
boolean |
Macro.render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
render() doesn't do anything in the final output rendering.
|
boolean |
Break.render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
This directive throws a StopCommand which signals either
the nearest Scope or the specified scope to stop rendering
its content.
|
boolean |
VelocimacroProxy.render(InternalContextAdapter context,
java.io.Writer writer,
Node node,
Renderable body)
Renders the macro using the context.
|
boolean |
RuntimeMacro.render(InternalContextAdapter context,
java.io.Writer writer,
Node node,
Renderable body)
This method is used with BlockMacro when we want to render a macro with a body AST.
|
protected void |
Foreach.renderBlock(InternalContextAdapter context,
java.io.Writer writer,
Node block) |
private boolean |
Include.renderOutput(Node node,
InternalContextAdapter context,
java.io.Writer writer)
does the actual rendering of the included file
|
Constructor and Description |
---|
Reference(InternalContextAdapter context,
Block parent) |
Modifier and Type | Method and Description |
---|---|
void |
For.init(RuntimeServices rs,
InternalContextAdapter context,
Node node) |
boolean |
For.render(InternalContextAdapter context,
java.io.Writer writer,
Node node) |
protected void |
For.renderBlock(InternalContextAdapter context,
java.io.Writer writer,
Node node) |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
ASTIndex.adjMinusIndexArg(java.lang.Object argument,
java.lang.Object o,
InternalContextAdapter context,
SimpleNode node)
If argument is an Integer and negative, then return (o.size() - argument).
|
boolean |
ASTOrNode.evaluate(InternalContextAdapter context)
the logical or :
|
boolean |
ASTStringLiteral.evaluate(InternalContextAdapter context) |
boolean |
ASTNegateNode.evaluate(InternalContextAdapter context) |
boolean |
ASTComparisonNode.evaluate(InternalContextAdapter context) |
boolean |
ASTTrue.evaluate(InternalContextAdapter context) |
boolean |
ASTAndNode.evaluate(InternalContextAdapter context)
logical and :
|
boolean |
ASTElseStatement.evaluate(InternalContextAdapter context)
An ASTElseStatement always evaluates to
true.
|
boolean |
ASTReference.evaluate(InternalContextAdapter context)
Computes boolean value of this reference
Returns the actual value of reference return type
boolean, and 'true' if value is not null
|
boolean |
ASTIntegerLiteral.evaluate(InternalContextAdapter context) |
boolean |
SimpleNode.evaluate(InternalContextAdapter context) |
boolean |
ASTNotNode.evaluate(InternalContextAdapter context) |
boolean |
ASTFalse.evaluate(InternalContextAdapter context) |
boolean |
ASTExpression.evaluate(InternalContextAdapter context) |
boolean |
ASTFloatingPointLiteral.evaluate(InternalContextAdapter context) |
boolean |
Node.evaluate(InternalContextAdapter context) |
boolean |
ASTElseIfStatement.evaluate(InternalContextAdapter context)
An ASTElseStatement is true if the expression
it contains evaluates to true.
|
boolean |
ASTNENode.evaluate(InternalContextAdapter context) |
boolean |
ASTObjectArray.evaluate(InternalContextAdapter context) |
boolean |
ASTMap.evaluate(InternalContextAdapter context) |
java.lang.Object |
ASTIndex.execute(java.lang.Object o,
InternalContextAdapter context) |
java.lang.Object |
ASTMethod.execute(java.lang.Object o,
InternalContextAdapter context)
invokes the method.
|
java.lang.Object |
ASTReference.execute(java.lang.Object o,
InternalContextAdapter context)
gets an Object that 'is' the value of the reference
|
java.lang.Object |
SimpleNode.execute(java.lang.Object o,
InternalContextAdapter context) |
java.lang.Object |
ASTIdentifier.execute(java.lang.Object o,
InternalContextAdapter context) |
java.lang.Object |
Node.execute(java.lang.Object o,
InternalContextAdapter context) |
protected java.lang.String |
SimpleNode.getLocation(InternalContextAdapter context)
Return a string that tells the current location of this node.
|
private java.lang.String |
ASTReference.getNullString(InternalContextAdapter context)
This method helps to implement the "render literal if null" functionality.
|
java.lang.Object |
ASTReference.getRootVariableValue(InternalContextAdapter context) |
private java.lang.Object |
ASTMethod.handleInvocationException(java.lang.Object o,
InternalContextAdapter context,
java.lang.Throwable t) |
protected java.lang.Object |
ASTMathNode.handleSpecial(java.lang.Object left,
java.lang.Object right,
InternalContextAdapter context)
Extension hook to allow special behavior by subclasses
If this method returns a non-null value, that is returned,
rather than the result of the math operation.
|
protected java.lang.Object |
ASTAddNode.handleSpecial(java.lang.Object left,
java.lang.Object right,
InternalContextAdapter context) |
java.lang.Object |
ASTMathNode.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTIndex.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTAssignment.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTWord.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTText.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTStringLiteral.init(InternalContextAdapter context,
java.lang.Object data)
init : we don't have to do much.
|
java.lang.Object |
ASTNegateNode.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTMethod.init(InternalContextAdapter context,
java.lang.Object data)
simple init - init our subtree and get what we can from
the AST
|
java.lang.Object |
ASTMulNode.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTTextblock.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTTrue.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTEscapedDirective.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTprocess.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTBlock.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTBinaryOperator.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTElseStatement.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTReference.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTIntegerLiteral.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
SimpleNode.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTNotNode.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTIncludeStatement.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTIntegerRange.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTVariable.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTFalse.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTDirective.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTDirectiveAssign.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTIdentifier.init(InternalContextAdapter context,
java.lang.Object data)
simple init - don't do anything that is context specific.
|
java.lang.Object |
ASTExpression.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTFloatingPointLiteral.init(InternalContextAdapter context,
java.lang.Object data)
Initialization method - doesn't do much but do the object
creation.
|
java.lang.Object |
ASTModNode.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
Node.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTIfStatement.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTElseIfStatement.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTSetDirective.init(InternalContextAdapter context,
java.lang.Object data)
simple init.
|
java.lang.Object |
ASTEscape.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTObjectArray.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTLogicalOperator.init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
ASTComment.init(InternalContextAdapter context,
java.lang.Object data)
We need to make sure we catch any of the dreaded MORE tokens.
|
java.lang.Object |
ASTMap.init(InternalContextAdapter context,
java.lang.Object data) |
abstract java.lang.Number |
ASTMathNode.perform(java.lang.Number left,
java.lang.Number right,
InternalContextAdapter context)
Performs the math operation represented by this node.
|
java.lang.Number |
ASTMulNode.perform(java.lang.Number left,
java.lang.Number right,
InternalContextAdapter context) |
java.lang.Number |
ASTAddNode.perform(java.lang.Number left,
java.lang.Number right,
InternalContextAdapter context) |
java.lang.Number |
ASTModNode.perform(java.lang.Number left,
java.lang.Number right,
InternalContextAdapter context) |
java.lang.Number |
ASTDivNode.perform(java.lang.Number left,
java.lang.Number right,
InternalContextAdapter context) |
java.lang.Number |
ASTSubtractNode.perform(java.lang.Number left,
java.lang.Number right,
InternalContextAdapter context) |
void |
ASTIfStatement.process(InternalContextAdapter context,
ParserVisitor visitor) |
boolean |
ASTText.render(InternalContextAdapter context,
java.io.Writer writer) |
boolean |
ASTTextblock.render(InternalContextAdapter context,
java.io.Writer writer) |
boolean |
ASTEscapedDirective.render(InternalContextAdapter context,
java.io.Writer writer) |
boolean |
ASTBlock.render(InternalContextAdapter context,
java.io.Writer writer) |
boolean |
ASTReference.render(InternalContextAdapter context,
java.io.Writer writer)
gets the value of the reference and outputs it to the
writer.
|
boolean |
SimpleNode.render(InternalContextAdapter context,
java.io.Writer writer) |
boolean |
ASTDirective.render(InternalContextAdapter context,
java.io.Writer writer) |
boolean |
Node.render(InternalContextAdapter context,
java.io.Writer writer) |
boolean |
ASTIfStatement.render(InternalContextAdapter context,
java.io.Writer writer) |
boolean |
ASTElseIfStatement.render(InternalContextAdapter context,
java.io.Writer writer) |
boolean |
ASTSetDirective.render(InternalContextAdapter context,
java.io.Writer writer)
puts the value of the RHS into the context under the key of the LHS
|
boolean |
ASTEscape.render(InternalContextAdapter context,
java.io.Writer writer) |
boolean |
ASTComment.render(InternalContextAdapter context,
java.io.Writer writer) |
boolean |
ASTReference.setValue(InternalContextAdapter context,
java.lang.Object value)
Sets the value of a complex reference (something like $foo.bar)
Currently used by ASTSetReference()
|
java.lang.Object |
ASTMathNode.value(InternalContextAdapter context)
gets the two args and performs the operation on them
|
java.lang.Object |
ASTOrNode.value(InternalContextAdapter context)
Returns the value of the expression.
|
java.lang.Object |
ASTStringLiteral.value(InternalContextAdapter context)
renders the value of the string literal If the properties allow, and the
string literal contains a $ or a # the literal is rendered against the
context Otherwise, the stringlit is returned.
|
java.lang.Object |
ASTNegateNode.value(InternalContextAdapter context) |
java.lang.Object |
ASTComparisonNode.value(InternalContextAdapter context) |
java.lang.Object |
ASTTrue.value(InternalContextAdapter context) |
java.lang.Object |
ASTAndNode.value(InternalContextAdapter context)
Returns the value of the expression.
|
java.lang.Object |
ASTReference.value(InternalContextAdapter context) |
java.lang.Object |
ASTIntegerLiteral.value(InternalContextAdapter context) |
java.lang.Object |
SimpleNode.value(InternalContextAdapter context) |
java.lang.Object |
ASTNotNode.value(InternalContextAdapter context) |
java.lang.Object |
ASTIntegerRange.value(InternalContextAdapter context)
does the real work.
|
java.lang.Object |
ASTFalse.value(InternalContextAdapter context) |
java.lang.Object |
ASTExpression.value(InternalContextAdapter context) |
java.lang.Object |
ASTFloatingPointLiteral.value(InternalContextAdapter context) |
java.lang.Object |
Node.value(InternalContextAdapter context) |
java.lang.Object |
ASTObjectArray.value(InternalContextAdapter context) |
java.lang.Object |
ASTMap.value(InternalContextAdapter context) |
Modifier and Type | Field and Description |
---|---|
protected InternalContextAdapter |
BaseVisitor.context
Context used during traversal
|
Modifier and Type | Method and Description |
---|---|
void |
BaseVisitor.setContext(InternalContextAdapter context) |
Modifier and Type | Method and Description |
---|---|
static VelMethod |
ClassUtils.getMethod(java.lang.String methodName,
java.lang.Object[] params,
java.lang.Class<?>[] paramClasses,
java.lang.Object o,
InternalContextAdapter context,
SimpleNode node,
boolean strictRef)
Lookup a VelMethod object given the method signature that is specified in
the passed in parameters.
|