freemarker.ext.misc
Class JavaToHtml
java.lang.Object
|
+--freemarker.ext.misc.JavaToHtml
- All Implemented Interfaces:
- TemplateModel, TemplateTransformModel2
- public class JavaToHtml
- extends java.lang.Object
- implements TemplateTransformModel2
A FM-Classic 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 2003/11/03 03:33:31 run2000 Exp $
- Author:
- Nicholas Cull
Constructor Summary |
JavaToHtml()
Creates new JavaToHtml |
Method Summary |
boolean |
isEmpty()
Is the object empty? |
void |
transform(java.io.Reader source,
java.io.Writer output)
Performs a transformation/filter on FM-Classic 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 java.io.IOException,
TemplateModelException
- Performs a transformation/filter on FM-Classic output.
- Specified by:
transform
in interface TemplateTransformModel2
- Parameters:
source
- the input to be transformedoutput
- the destination of the transformation
isEmpty
public boolean isEmpty()
- Is the object empty?
- Specified by:
isEmpty
in interface TemplateModel
- Returns:
false
, to indicate this object is not empty