xdoclet.template
Class TemplateParser
public class TemplateParser
Subclass of Template Engine that do not generate anything but only parse the document. The TagHandlers have a
callback entry to this method to set in it anything they want to. This class was introduced for parsing .j files and
return a list of merge files needed for the generation. The timestamp checking can then verify all files involved in
a generation and bypass the generation if -nothing has changed-.
- Vincent Harcq (vincent.harcq@hubmethods.com)
void | addMergeFile(String file) - Callback by the MergeTagsHandler to give the parser the list of merge files involved.
|
void | generate(String template) - In this class, this method does not -generate- anything but only parse the files.
|
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(String prefix)
|
boolean | hasMergeFile(String file) - Callback by the MergeTagsHandler to know if a merge file has already been taken into account.
|
protected Object | invoke(Method m, Object cmdImplProvider, Object[] params1) - Describe what the method does
|
protected void | invokeContentMethod(String cmd, Properties attributes, 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.
|
generate , getCurrentLineNum , getEngineInstance , getLineNumber , getNamespaces , getOutput , getTagHandlerFor , getTemplateURL , handleTag , invoke , invokeContentMethod , invokeMethod , outputOf , print , setCurrentLineNum , setDocEncoding , setOutput , setTagHandlerFor , setTemplateURL , setWriter , setXJavaDoc , skipWhitespace , start |
TemplateParser
protected TemplateParser()
Initialize the Template Engine. Reads the XDoclet properties file, and loads any XTag handler classes specified.
addMergeFile
public void addMergeFile(String file)
Callback by the MergeTagsHandler to give the parser the list of merge files involved.
file
- one merge file involved
generate
public void generate(String template)
throws TemplateException
In this class, this method does not -generate- anything but only parse the files. Callback to this class can be
made by specific TagHandlers during the process.
- generate in interface TemplateEngine
template
- Description of Parameter
getMergeFiles
public String[] getMergeFiles()
Return the list of merge files involved in the generation.
getParserInstance
public static TemplateParser getParserInstance()
Gets the ParserInstance attribute of the TemplateParser class
hasMergeFile
public boolean hasMergeFile(String file)
Callback by the MergeTagsHandler to know if a merge file has already been taken into account.
invoke
protected Object invoke(Method m,
Object cmdImplProvider,
Object[] params1)
throws InvocationTargetException,
IllegalAccessException,
TemplateException
Describe what the method does
- invoke in interface TemplateEngine
m
- Describe what the parameter doescmdImplProvider
- Describe what the parameter doesparams1
- Describe what the parameter does
- Describe the return value
invokeContentMethod
protected void invokeContentMethod(String cmd,
Properties attributes,
String template,
int i)
throws TemplateException
Describe what the method does
- invokeContentMethod in interface TemplateEngine
cmd
- Describe what the parameter doesattributes
- Describe what the parameter doestemplate
- Describe what the parameter doesi
- Describe what the parameter does