Package org.antlr.stringtemplate
Class PathGroupLoader
java.lang.Object
org.antlr.stringtemplate.PathGroupLoader
- All Implemented Interfaces:
StringTemplateGroupLoader
- Direct Known Subclasses:
CommonGroupLoader
A brain dead loader that looks only in the directory(ies) you
specify in the ctor.
You may specify the char encoding.
NOTE: this does not work when you jar things up! Use
CommonGroupLoader instead in that case
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List
List of ':' separated dirs to pull groups fromprotected StringTemplateErrorListener
-
Constructor Summary
ConstructorsConstructorDescriptionPathGroupLoader
(String dirStr, StringTemplateErrorListener errors) Pass a single dir or multiple dirs separated by colons from which to load groups/interfaces. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
protected InputStreamReader
Load the group called groupName from somewhere.loadGroup
(String groupName, Class templateLexer, StringTemplateGroup superGroup) Load a group with a specified superGroup.loadGroup
(String groupName, StringTemplateGroup superGroup) Load a group with a specified superGroup.loadInterface
(String interfaceName) Load the interface called interfaceName from somewhere.protected BufferedReader
Look in each directory for the file called 'name'.void
setFileCharEncoding
(String fileCharEncoding)
-
Field Details
-
dirs
List of ':' separated dirs to pull groups from -
errors
-
-
Constructor Details
-
PathGroupLoader
-
PathGroupLoader
Pass a single dir or multiple dirs separated by colons from which to load groups/interfaces.
-
-
Method Details
-
loadGroup
public StringTemplateGroup loadGroup(String groupName, Class templateLexer, StringTemplateGroup superGroup) Load a group with a specified superGroup. Groups with region definitions must know their supergroup to find templates during parsing.- Specified by:
loadGroup
in interfaceStringTemplateGroupLoader
-
loadGroup
Description copied from interface:StringTemplateGroupLoader
Load a group with a specified superGroup. Groups with region definitions must know their supergroup to find templates during parsing.- Specified by:
loadGroup
in interfaceStringTemplateGroupLoader
-
loadGroup
Description copied from interface:StringTemplateGroupLoader
Load the group called groupName from somewhere. Return null if no group is found.- Specified by:
loadGroup
in interfaceStringTemplateGroupLoader
-
loadInterface
Description copied from interface:StringTemplateGroupLoader
Load the interface called interfaceName from somewhere. Return null if no interface is found.- Specified by:
loadInterface
in interfaceStringTemplateGroupLoader
-
locate
Look in each directory for the file called 'name'.- Throws:
IOException
-
getInputStreamReader
-
getFileCharEncoding
-
setFileCharEncoding
-
error
-
error
-