xdoclet.template

Class TemplateEngine


public class TemplateEngine
extends java.lang.Object

Field Summary

static String
TAG_MAPPINGS_FILE
protected static String
XDOCLET_HEAD
protected static int
XDOCLET_HEAD_LEN
protected static String
XDOCLET_PREFIX
protected static String
XDOCLET_TAIL
protected static int
XDOCLET_TAIL_LEN
protected String
docEncoding
protected xdoclet.template.PrettyPrintWriter
out
protected File
output

Constructor Summary

TemplateEngine()

Method Summary

void
generate(String template)
int
getCurrentLineNum()
static xdoclet.template.TemplateEngine
getEngineInstance()
protected static int
getLineNumber(String template, int tillIndex)
Set
getNamespaces()
File
getOutput()
xdoclet.template.TemplateTagHandler
getTagHandlerFor(String prefix)
URL
getTemplateURL()
protected int
handleTag(int index, String template)
protected Object
invoke(Method m, Object cmdImplProvider, Object[] params1)
protected void
invokeContentMethod(String cmd, Properties attributes, String template, int i)
protected Object
invokeMethod(String cmd, Object[] params1, Object[] params2, String template, int i)
String
outputOf(String template)
void
print(String output)
void
setCurrentLineNum(int currentLineNum)
void
setDocEncoding(String string)
void
setOutput(File output)
void
setTagHandlerFor(String prefix, TemplateTagHandler tagHandler)
void
setTemplateURL(URL templateURL)
void
setWriter(xdoclet.template.PrettyPrintWriter out)
void
setXJavaDoc(XJavaDoc xJavaDoc)
static int
skipWhitespace(String template, int i)
void
start()

Field Details

TAG_MAPPINGS_FILE

public static final String TAG_MAPPINGS_FILE

XDOCLET_HEAD

protected static final String XDOCLET_HEAD

XDOCLET_HEAD_LEN

protected static final int XDOCLET_HEAD_LEN

XDOCLET_PREFIX

protected static final String XDOCLET_PREFIX

XDOCLET_TAIL

protected static final String XDOCLET_TAIL

XDOCLET_TAIL_LEN

protected static final int XDOCLET_TAIL_LEN

docEncoding

protected String docEncoding

out

protected xdoclet.template.PrettyPrintWriter out

output

protected File output

Constructor Details

TemplateEngine

protected TemplateEngine()

Method Details

generate

public void generate(String template)
            throws TemplateException

getCurrentLineNum

public int getCurrentLineNum()

getEngineInstance

public static xdoclet.template.TemplateEngine getEngineInstance()

getLineNumber

protected static int getLineNumber(String template,
                                   int tillIndex)

getNamespaces

public Set getNamespaces()

getOutput

public File getOutput()

getTagHandlerFor

public xdoclet.template.TemplateTagHandler getTagHandlerFor(String prefix)
            throws TemplateException

getTemplateURL

public URL getTemplateURL()

handleTag

protected int handleTag(int index,
                        String template)
            throws TemplateException

invoke

protected Object invoke(Method m,
                        Object cmdImplProvider,
                        Object[] params1)
            throws InvocationTargetException,
                   IllegalAccessException,
                   TemplateException

invokeContentMethod

protected void invokeContentMethod(String cmd,
                                   Properties attributes,
                                   String template,
                                   int i)
            throws TemplateException

invokeMethod

protected Object invokeMethod(String cmd,
                              Object[] params1,
                              Object[] params2,
                              String template,
                              int i)
            throws TemplateException

outputOf

public String outputOf(String template)
            throws TemplateException

print

public final void print(String output)

setCurrentLineNum

public void setCurrentLineNum(int currentLineNum)

setDocEncoding

public void setDocEncoding(String string)

setOutput

public void setOutput(File output)

setTagHandlerFor

public void setTagHandlerFor(String prefix,
                             TemplateTagHandler tagHandler)
            throws TemplateException

setTemplateURL

public void setTemplateURL(URL templateURL)

setWriter

public void setWriter(xdoclet.template.PrettyPrintWriter out)

setXJavaDoc

public void setXJavaDoc(XJavaDoc xJavaDoc)

skipWhitespace

public static int skipWhitespace(String template,
                                 int i)

start

public void start()
            throws TemplateException