freemarker.template.utility
Class JavaToHtml
java.lang.Object
|
+--freemarker.template.utility.JavaToHtml
- All Implemented Interfaces:
- TemplateModel, TemplateTransformModel
- public class JavaToHtml
- extends java.lang.Object
- implements TemplateTransformModel
A FreeMarker transformer that performs syntax colouring of Java source
files, and outputs the results in HTML. The HTML is HTML 3.2 compliant,
though later transitional DTDs should have no problems with this code.
The transformation uses the Jakarta ORO regular expression library,
available from the Jakarta Apache web site.
- Version:
- $Id: JavaToHtml.java,v 1.9 2002/04/23 10:35:37 szegedia Exp $
- Author:
- Nicholas Cull
Constructor Summary |
JavaToHtml()
Creates new JavaToHtml |
Method Summary |
boolean |
isEmpty()
|
void |
transform(java.io.Reader source,
java.io.Writer output)
Performs a transformation/filter on FreeMarker output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaToHtml
public JavaToHtml()
- Creates new JavaToHtml
transform
public void transform(java.io.Reader source,
java.io.Writer output)
throws TemplateModelException,
java.io.IOException
- Performs a transformation/filter on FreeMarker output.
- Specified by:
transform
in interface TemplateTransformModel
- Parameters:
source
- the input to be transformedoutput
- the destination of the transformation
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface TemplateModel
- Returns:
- true if this object is empty.