Package org.antlr.stringtemplate
Class StringTemplateGroupInterface
java.lang.Object
org.antlr.stringtemplate.StringTemplateGroupInterface
A group interface is like a group without the template implementations;
there are just template names/argument-lists like this:
interface foo;
class(name,fields);
method(name,args,body);
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringTemplateErrorListener
protected StringTemplateErrorListener
Where to report errors.protected String
What is the group nameprotected StringTemplateGroupInterface
Are we derived from another group? Templates not found in this group will be searched for in the superGroup recursively.protected Map
Maps template name to TemplateDefinition object -
Constructor Summary
ConstructorsConstructorDescriptionStringTemplateGroupInterface
(Reader r, StringTemplateErrorListener errors, StringTemplateGroupInterface superInterface) Create an interface from the input stream -
Method Summary
Modifier and TypeMethodDescriptionvoid
defineTemplate
(String name, LinkedHashMap formalArgs, boolean optional) void
void
Return a list of all template sigs that are present in the group, but that have wrong formal argument lists.Return a list of all template names missing from group that are defined in this interface.getName()
protected String
getTemplateSignature
(org.antlr.stringtemplate.StringTemplateGroupInterface.TemplateDefinition d) protected void
void
void
setSuperInterface
(StringTemplateGroupInterface superInterface) toString()
-
Field Details
-
name
What is the group name -
templates
Maps template name to TemplateDefinition object -
superInterface
Are we derived from another group? Templates not found in this group will be searched for in the superGroup recursively. -
listener
Where to report errors. All string templates in this group use this error handler by default. -
DEFAULT_ERROR_LISTENER
-
-
Constructor Details
-
StringTemplateGroupInterface
-
StringTemplateGroupInterface
-
StringTemplateGroupInterface
public StringTemplateGroupInterface(Reader r, StringTemplateErrorListener errors, StringTemplateGroupInterface superInterface) Create an interface from the input stream
-
-
Method Details
-
getSuperInterface
-
setSuperInterface
-
parseInterface
-
defineTemplate
-
getMissingTemplates
Return a list of all template names missing from group that are defined in this interface. Return null if all is well. -
getMismatchedTemplates
Return a list of all template sigs that are present in the group, but that have wrong formal argument lists. Return null if all is well. -
getName
-
setName
-
error
-
error
-
toString
-
getTemplateSignature
protected String getTemplateSignature(org.antlr.stringtemplate.StringTemplateGroupInterface.TemplateDefinition d)
-