Class STGroupFile



  • public class STGroupFile
    extends STGroup
    The internal representation of a single group file (which must end in ".stg"). If we fail to find a group file, look for it via the CLASSPATH as a resource. Templates are only looked up in this file or an import.
    • Field Detail

      • fileName

        public String fileName
      • url

        public URL url
      • alreadyLoaded

        protected boolean alreadyLoaded
    • Constructor Detail

      • STGroupFile

        public STGroupFile(String fileName)
        Load a file relative to current directory or from root or via CLASSPATH.
      • STGroupFile

        public STGroupFile(String fileName,
                           char delimiterStartChar,
                           char delimiterStopChar)
      • STGroupFile

        public STGroupFile(String fullyQualifiedFileName,
                           String encoding)
      • STGroupFile

        public STGroupFile(String fullyQualifiedFileName,
                           String encoding,
                           char delimiterStartChar,
                           char delimiterStopChar)
      • STGroupFile

        public STGroupFile(URL url,
                           String encoding,
                           char delimiterStartChar,
                           char delimiterStopChar)
    • Method Detail

      • isDictionary

        public boolean isDictionary(String name)
      • isDefined

        public boolean isDefined(String name)
        Description copied from class: STGroup
        Is this template defined in this group or from this group below? Names must be absolute, fully-qualified names like /a/b.
      • load

        protected CompiledST load(String name)
        Description copied from class: STGroup
        Load st from disk if directory or load whole group file if .stg file (then return just one template). name is fully-qualified.
      • load

        public void load()
        Description copied from class: STGroup
        Force a load if it makes sense for the group.
      • getName

        public String getName()
      • getFileName

        public String getFileName()
      • getRootDirURL

        public URL getRootDirURL()
        Description copied from class: STGroup
        Return root dir if this is group dir; return dir containing group file if this is group file. This is derived from original incoming dir or filename. If it was absolute, this should come back as full absolute path. If only a URL is available, return URL of one dir up.