Package org.antlr.stringtemplate
Class CommonGroupLoader
java.lang.Object
org.antlr.stringtemplate.PathGroupLoader
org.antlr.stringtemplate.CommonGroupLoader
- All Implemented Interfaces:
StringTemplateGroupLoader
A simple loader that looks only in the directory(ies) you
specify in the ctor, but it uses the classpath rather than
absolute dirs so it can be used when the ST application is jar'd up.
You may specify the char encoding.
-
Field Summary
Fields inherited from class org.antlr.stringtemplate.PathGroupLoader
dirs, errors
-
Constructor Summary
ConstructorsConstructorDescriptionCommonGroupLoader
(String dirStr, StringTemplateErrorListener errors) Pass a single dir or multiple dirs separated by colons from which to load groups/interfaces. -
Method Summary
Modifier and TypeMethodDescriptionprotected BufferedReader
Look in each relative directory for the file called 'name'.Methods inherited from class org.antlr.stringtemplate.PathGroupLoader
error, error, getFileCharEncoding, getInputStreamReader, loadGroup, loadGroup, loadGroup, loadInterface, setFileCharEncoding
-
Constructor Details
-
CommonGroupLoader
-
CommonGroupLoader
Pass a single dir or multiple dirs separated by colons from which to load groups/interfaces. These are interpreted as relative paths to be used with CLASSPATH to locate groups. E.g., If you pass in "org/antlr/codegen/templates" and ask to load group "foo" it will try to load via classpath as "org/antlr/codegen/templates/foo".
-
-
Method Details
-
locate
Look in each relative directory for the file called 'name'. Load via classpath.- Overrides:
locate
in classPathGroupLoader
- Throws:
IOException
-