org.apache.velocity.test.misc
Class Test

java.lang.Object
  |
  +--org.apache.velocity.test.misc.Test
All Implemented Interfaces:
EventHandler, MethodExceptionEventHandler, NullSetEventHandler, ReferenceInsertionEventHandler

public class Test
extends java.lang.Object
implements ReferenceInsertionEventHandler, NullSetEventHandler, MethodExceptionEventHandler

This class the testbed for Velocity. It is used to test all the directives support by Velocity.

Version:
$Id: Test.java,v 1.30 2001/05/20 21:14:32 geirm Exp $
Author:
Jason van Zyl, Geir Magnusson Jr.

Field Summary
private static java.util.Stack writerStack
          Cache of writers
 
Constructor Summary
Test(java.lang.String templateFile, java.lang.String encoding)
           
 
Method Summary
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)
           
 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.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

writerStack

private static java.util.Stack writerStack
Cache of writers
Constructor Detail

Test

public Test(java.lang.String templateFile,
            java.lang.String encoding)
Method Detail

referenceInsert

public java.lang.Object referenceInsert(java.lang.String reference,
                                        java.lang.Object value)
Specified by:
referenceInsert in interface ReferenceInsertionEventHandler

shouldLogOnNullSet

public boolean shouldLogOnNullSet(java.lang.String lhs,
                                  java.lang.String rhs)
Description copied from interface: NullSetEventHandler
Called when the RHS of a #set() is null, which will result in a null LHS.
Specified by:
shouldLogOnNullSet in interface NullSetEventHandler
Following copied from interface: org.apache.velocity.app.event.NullSetEventHandler
Parameters:
lhs - reference literal of left-hand-side of set statement
rhs - reference literal of right-hand-side of set statement
Returns:
true if log message should be written, false otherwise

methodException

public java.lang.Object methodException(java.lang.Class claz,
                                        java.lang.String method,
                                        java.lang.Exception e)
                                 throws java.lang.Exception
Specified by:
methodException in interface MethodExceptionEventHandler

main

public static void main(java.lang.String[] args)


Copyright © 2001 Apache Software Foundation. All Rights Reserved.