Class StringTemplateGroupInterface

java.lang.Object
org.antlr.stringtemplate.StringTemplateGroupInterface

public class StringTemplateGroupInterface extends Object
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 Details

    • name

      protected String name
      What is the group name
    • templates

      protected Map templates
      Maps template name to TemplateDefinition object
    • superInterface

      protected StringTemplateGroupInterface superInterface
      Are we derived from another group? Templates not found in this group will be searched for in the superGroup recursively.
    • listener

      protected StringTemplateErrorListener listener
      Where to report errors. All string templates in this group use this error handler by default.
    • DEFAULT_ERROR_LISTENER

      public static StringTemplateErrorListener DEFAULT_ERROR_LISTENER
  • Constructor Details

  • Method Details

    • getSuperInterface

      public StringTemplateGroupInterface getSuperInterface()
    • setSuperInterface

      public void setSuperInterface(StringTemplateGroupInterface superInterface)
    • parseInterface

      protected void parseInterface(Reader r)
    • defineTemplate

      public void defineTemplate(String name, LinkedHashMap formalArgs, boolean optional)
    • getMissingTemplates

      public List getMissingTemplates(StringTemplateGroup group)
      Return a list of all template names missing from group that are defined in this interface. Return null if all is well.
    • getMismatchedTemplates

      public List getMismatchedTemplates(StringTemplateGroup group)
      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

      public String getName()
    • setName

      public void setName(String name)
    • error

      public void error(String msg)
    • error

      public void error(String msg, Exception e)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getTemplateSignature

      protected String getTemplateSignature(org.antlr.stringtemplate.StringTemplateGroupInterface.TemplateDefinition d)