org.apache.velocity.test.misc
public class Test extends java.lang.Object implements ReferenceInsertionEventHandler, NullSetEventHandler, MethodExceptionEventHandler
Modifier and Type | Field and Description |
---|---|
private static java.util.Stack |
writerStack
Cache of writers
|
Constructor and Description |
---|
Test(java.lang.String templateFile,
java.lang.String encoding) |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args) |
java.lang.Object |
methodException(java.lang.Class claz,
java.lang.String method,
java.lang.Exception e) |
java.lang.Object |
referenceInsert(java.lang.String reference,
java.lang.Object value)
A call-back which is executed during Velocity merge before a
reference value is inserted into the output stream.
|
boolean |
shouldLogOnNullSet(java.lang.String lhs,
java.lang.String rhs)
Called when the RHS of a #set() is null, which will result
in a null LHS.
|
public java.lang.Object referenceInsert(java.lang.String reference, java.lang.Object value)
ReferenceInsertionEventHandler
referenceInsert
in interface ReferenceInsertionEventHandler
reference
- Reference from template about to be inserted.value
- Value about to be inserted (after its
toString()
method is called).toString()
should be
called for output.public boolean shouldLogOnNullSet(java.lang.String lhs, java.lang.String rhs)
NullSetEventHandler
shouldLogOnNullSet
in interface NullSetEventHandler
lhs
- reference literal of left-hand-side of set statementrhs
- reference literal of right-hand-side of set statementpublic java.lang.Object methodException(java.lang.Class claz, java.lang.String method, java.lang.Exception e) throws java.lang.Exception
methodException
in interface MethodExceptionEventHandler
java.lang.Exception
public static void main(java.lang.String[] args)
Copyright ? 2002 Apache Software Foundation. All Rights Reserved.