| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc on Wed Apr 14 08:26:35 EDT 2004 --> |
| <TITLE> |
| Velocity 1.4 API: Class Test |
| </TITLE> |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> |
| </HEAD> |
| <BODY BGCOLOR="white"> |
| |
| <!-- ========== START OF NAVBAR ========== --> |
| <A NAME="navbar_top"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Test.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| PREV CLASS |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="Test.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.velocity.test.misc</FONT> |
| <BR> |
| Class Test</H2> |
| <PRE> |
| java.lang.Object |
| | |
| +--<B>org.apache.velocity.test.misc.Test</B> |
| </PRE> |
| <DL> |
| <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/velocity/app/event/EventHandler.html">EventHandler</A>, <A HREF="../../../../../org/apache/velocity/app/event/MethodExceptionEventHandler.html">MethodExceptionEventHandler</A>, <A HREF="../../../../../org/apache/velocity/app/event/NullSetEventHandler.html">NullSetEventHandler</A>, <A HREF="../../../../../org/apache/velocity/app/event/ReferenceInsertionEventHandler.html">ReferenceInsertionEventHandler</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT>public class <B>Test</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../org/apache/velocity/app/event/ReferenceInsertionEventHandler.html">ReferenceInsertionEventHandler</A>, <A HREF="../../../../../org/apache/velocity/app/event/NullSetEventHandler.html">NullSetEventHandler</A>, <A HREF="../../../../../org/apache/velocity/app/event/MethodExceptionEventHandler.html">MethodExceptionEventHandler</A></DL> |
| |
| <P> |
| This class the testbed for Velocity. It is used to |
| test all the directives support by Velocity. |
| <P> |
| <DL> |
| <DT><B>Version: </B><DD>$Id: Test.java,v 1.34.8.1 2004/03/03 23:23:05 geirm Exp $</DD> |
| <DT><B>Author: </B><DD><a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>, <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a></DD> |
| </DL> |
| <HR> |
| |
| <P> |
| <!-- ======== INNER CLASS SUMMARY ======== --> |
| |
| |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private static java.util.Stack</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/test/misc/Test.html#writerStack">writerStack</A></B></CODE> |
| |
| <BR> |
| Cache of writers</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| |
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Constructor Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/test/misc/Test.html#Test(java.lang.String, java.lang.String)">Test</A></B>(java.lang.String templateFile, |
| java.lang.String encoding)</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/test/misc/Test.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/test/misc/Test.html#methodException(java.lang.Class, java.lang.String, java.lang.Exception)">methodException</A></B>(java.lang.Class claz, |
| java.lang.String method, |
| java.lang.Exception e)</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/test/misc/Test.html#referenceInsert(java.lang.String, java.lang.Object)">referenceInsert</A></B>(java.lang.String reference, |
| java.lang.Object value)</CODE> |
| |
| <BR> |
| A call-back which is executed during Velocity merge before a |
| reference value is inserted into the output stream.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/test/misc/Test.html#shouldLogOnNullSet(java.lang.String, java.lang.String)">shouldLogOnNullSet</A></B>(java.lang.String lhs, |
| java.lang.String rhs)</CODE> |
| |
| <BR> |
| Called when the RHS of a #set() is null, which will result |
| in a null LHS.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TD><B>Methods inherited from class java.lang.Object</B></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait</CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| <A NAME="field_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Field Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="writerStack"><!-- --></A><H3> |
| writerStack</H3> |
| <PRE> |
| private static java.util.Stack <B>writerStack</B></PRE> |
| <DL> |
| <DD>Cache of writers</DL> |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Constructor Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="Test(java.lang.String, java.lang.String)"><!-- --></A><H3> |
| Test</H3> |
| <PRE> |
| public <B>Test</B>(java.lang.String templateFile, |
| java.lang.String encoding)</PRE> |
| <DL> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="referenceInsert(java.lang.String, java.lang.Object)"><!-- --></A><H3> |
| referenceInsert</H3> |
| <PRE> |
| public java.lang.Object <B>referenceInsert</B>(java.lang.String reference, |
| java.lang.Object value)</PRE> |
| <DL> |
| <DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/velocity/app/event/ReferenceInsertionEventHandler.html">ReferenceInsertionEventHandler</A></CODE></B></DD> |
| <DD>A call-back which is executed during Velocity merge before a |
| reference value is inserted into the output stream.<DD><DL> |
| <DT><B>Specified by: </B><DD><CODE><A HREF="../../../../../org/apache/velocity/app/event/ReferenceInsertionEventHandler.html#referenceInsert(java.lang.String, java.lang.Object)">referenceInsert</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/velocity/app/event/ReferenceInsertionEventHandler.html">ReferenceInsertionEventHandler</A></CODE></DL> |
| </DD> |
| <DD>Following copied from interface: <CODE>org.apache.velocity.app.event.ReferenceInsertionEventHandler</CODE></DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>reference</CODE> - Reference from template about to be inserted.<DD><CODE>value</CODE> - Value about to be inserted (after its |
| <code>toString()</code> method is called).<DT><B>Returns:</B><DD>Object on which <code>toString()</code> should be |
| called for output.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="shouldLogOnNullSet(java.lang.String, java.lang.String)"><!-- --></A><H3> |
| shouldLogOnNullSet</H3> |
| <PRE> |
| public boolean <B>shouldLogOnNullSet</B>(java.lang.String lhs, |
| java.lang.String rhs)</PRE> |
| <DL> |
| <DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/velocity/app/event/NullSetEventHandler.html">NullSetEventHandler</A></CODE></B></DD> |
| <DD>Called when the RHS of a #set() is null, which will result |
| in a null LHS.<DD><DL> |
| <DT><B>Specified by: </B><DD><CODE><A HREF="../../../../../org/apache/velocity/app/event/NullSetEventHandler.html#shouldLogOnNullSet(java.lang.String, java.lang.String)">shouldLogOnNullSet</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/velocity/app/event/NullSetEventHandler.html">NullSetEventHandler</A></CODE></DL> |
| </DD> |
| <DD>Following copied from interface: <CODE>org.apache.velocity.app.event.NullSetEventHandler</CODE></DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>lhs</CODE> - reference literal of left-hand-side of set statement<DD><CODE>rhs</CODE> - reference literal of right-hand-side of set statement<DT><B>Returns:</B><DD>true if log message should be written, false otherwise</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="methodException(java.lang.Class, java.lang.String, java.lang.Exception)"><!-- --></A><H3> |
| methodException</H3> |
| <PRE> |
| public java.lang.Object <B>methodException</B>(java.lang.Class claz, |
| java.lang.String method, |
| java.lang.Exception e) |
| throws java.lang.Exception</PRE> |
| <DL> |
| <DD><DL> |
| <DT><B>Specified by: </B><DD><CODE><A HREF="../../../../../org/apache/velocity/app/event/MethodExceptionEventHandler.html#methodException(java.lang.Class, java.lang.String, java.lang.Exception)">methodException</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/velocity/app/event/MethodExceptionEventHandler.html">MethodExceptionEventHandler</A></CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="main(java.lang.String[])"><!-- --></A><H3> |
| main</H3> |
| <PRE> |
| public static void <B>main</B>(java.lang.String[] args)</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| <!-- ========== START OF NAVBAR ========== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Test.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| PREV CLASS |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="Test.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| Copyright © 2002 Apache Software Foundation. All Rights Reserved. |
| </BODY> |
| </HTML> |