Class StringTemplateGroupInterface


  • public class StringTemplateGroupInterface
    extends java.lang.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 Detail

      • name

        protected java.lang.String name
        What is the group name
      • templates

        protected java.util.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.
    • Constructor Detail

      • StringTemplateGroupInterface

        public StringTemplateGroupInterface​(java.io.Reader r)
    • Method Detail

      • parseInterface

        protected void parseInterface​(java.io.Reader r)
      • defineTemplate

        public void defineTemplate​(java.lang.String name,
                                   java.util.LinkedHashMap formalArgs,
                                   boolean optional)
      • getMissingTemplates

        public java.util.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 java.util.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 java.lang.String getName()
      • setName

        public void setName​(java.lang.String name)
      • error

        public void error​(java.lang.String msg)
      • error

        public void error​(java.lang.String msg,
                          java.lang.Exception e)
      • toString

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

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