xdoclet.template
public class TemplateParser extends TemplateEngine
docEncoding, out, output, TAG_MAPPINGS_FILE, XDOCLET_HEAD, XDOCLET_HEAD_LEN, XDOCLET_PREFIX, XDOCLET_TAIL, XDOCLET_TAIL_LEN
Modifier | Constructor and Description |
---|---|
protected |
TemplateParser()
Initialize the Template Engine.
|
Modifier and Type | Method and Description |
---|---|
void |
addMergeFile(java.lang.String file)
Callback by the MergeTagsHandler to give the parser the list of merge files involved.
|
void |
generate(java.lang.String template)
In this class, this method does not -generate- anything but only parse the files.
|
java.lang.String[] |
getMergeFiles()
Return the list of merge files involved in the generation.
|
static TemplateParser |
getParserInstance()
Gets the ParserInstance attribute of the TemplateParser class
|
TemplateTagHandler |
getTagHandlerFor(java.lang.String prefix)
Get the tag handler for the prefix.
|
boolean |
hasMergeFile(java.lang.String file)
Callback by the MergeTagsHandler to know if a merge file has already been taken into account.
|
protected java.lang.Object |
invoke(java.lang.reflect.Method m,
java.lang.Object cmdImplProvider,
java.lang.Object[] params1)
Describe what the method does
|
protected void |
invokeContentMethod(java.lang.String cmd,
java.util.Properties attributes,
java.lang.String template,
int i)
Describe what the method does
|
void |
start()
A utility method used for generating the dest_file based on template_file template file.
|
getCurrentLineNum, getEngineInstance, getLineNumber, getNamespaces, getOutput, getTemplateURL, handleTag, invokeMethod, outputOf, print, setCurrentLineNum, setDocEncoding, setOutput, setTagHandlerFor, setTemplateURL, setWriter, setXJavaDoc, skipWhitespace
protected TemplateParser()
public static TemplateParser getParserInstance()
public TemplateTagHandler getTagHandlerFor(java.lang.String prefix) throws TemplateException
TemplateEngine
getTagHandlerFor
in class TemplateEngine
prefix
- The prefix that the tag handler is mapped toTemplateException
- If there is no tag handler class for the prefix specified.public java.lang.String[] getMergeFiles()
public void start() throws TemplateException
start
in class TemplateEngine
TemplateException
- Description of Exceptionpublic void generate(java.lang.String template) throws TemplateException
generate
in class TemplateEngine
template
- Description of ParameterTemplateException
- Description of ExceptionTemplateEngine.outputOf(java.lang.String)
public void addMergeFile(java.lang.String file)
file
- one merge file involvedpublic boolean hasMergeFile(java.lang.String file)
file
- protected void invokeContentMethod(java.lang.String cmd, java.util.Properties attributes, java.lang.String template, int i) throws TemplateException
invokeContentMethod
in class TemplateEngine
cmd
- Describe what the parameter doesattributes
- Describe what the parameter doestemplate
- Describe what the parameter doesi
- Describe what the parameter doesTemplateException
- Describe the exceptionTemplateEngine.invokeMethod(java.lang.String,java.lang.Object[],java.lang.Object[],java.lang.String,int)
protected java.lang.Object invoke(java.lang.reflect.Method m, java.lang.Object cmdImplProvider, java.lang.Object[] params1) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException, TemplateException
invoke
in class TemplateEngine
m
- Describe what the parameter doescmdImplProvider
- Describe what the parameter doesparams1
- Describe what the parameter doesjava.lang.reflect.InvocationTargetException
- Describe the exceptionjava.lang.IllegalAccessException
- Describe the exceptionTemplateException
- Describe the exception