|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.digester.AbstractObjectCreationFactory
org.sf.codejen.TemplateConfigurationParser
public class TemplateConfigurationParser
Parser to parse the codegen config.
| Field Summary |
|---|
| Fields inherited from class org.apache.commons.digester.AbstractObjectCreationFactory |
|---|
digester |
| Constructor Summary | |
|---|---|
TemplateConfigurationParser()
|
|
| Method Summary | |
|---|---|
Object |
createObject(Attributes attrs)
|
static TemplateConfigurationParser |
getInstance()
|
TemplateConfiguration |
parse(InputStream in)
The main method to do the parsing. |
TemplateConfiguration |
parseFile(String fileName)
Parses the file in specified file name. |
TemplateConfiguration |
parseResource(String resourceString)
Parses the resource from class loader. |
TemplateConfiguration |
parseUrl(String urlString)
Parses the file in specified URL. |
TemplateConfiguration |
parseUrl(URL url)
Parses the file in specified URL. |
| Methods inherited from class org.apache.commons.digester.AbstractObjectCreationFactory |
|---|
getDigester, setDigester |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TemplateConfigurationParser()
| Method Detail |
|---|
public static TemplateConfigurationParser getInstance()
public Object createObject(Attributes attrs)
throws Exception
createObject in interface ObjectCreationFactorycreateObject in class AbstractObjectCreationFactoryException
public TemplateConfiguration parseResource(String resourceString)
throws IOException,
SAXException
resourceString - resource string to be parsed.
IOException - when error is encounter in file reading
SAXException - when error is encounter in config parsing
public TemplateConfiguration parseUrl(String urlString)
throws IOException,
SAXException
urlString - URL string to be parsed.
IOException - when error is encounter in file reading
SAXException - when error is encounter in config parsing
public TemplateConfiguration parseUrl(URL url)
throws IOException,
SAXException
url - URL instance to be parsed.
IOException - when error is encounter in file reading
SAXException - when error is encounter in config parsing
public TemplateConfiguration parseFile(String fileName)
throws IOException,
SAXException
fileName - codegen config file to be parsed.
IOException - when error is encounter in file reading
SAXException - when error is encounter in config parsing
public TemplateConfiguration parse(InputStream in)
throws IOException,
SAXException
class attribute should be specified in
config/template/postProcessor and
config/template/modelExtractor.
config/template/fileNameGenerator.
Attributes in config/include will be evaluated in this order:
fileurlresource
in - input stream to be parsed.
IOException - when error is encounter in file reading
SAXException - when error is encounter in config parsing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||