Class TemplateCore

  • Direct Known Subclasses:
    Template

    public abstract class TemplateCore
    extends Configurable
    Abstract base class for Template. Used to provide package-level access to secured internals used by Environment.
    • Constructor Detail

    • Method Detail

      • addMacro

        public void addMacro​(freemarker.core.ast.Macro macro)
        Called by code internally to maintain a table of macros
        Throws:
        SecurityException - if the macro with this name already exists, getConfiguration().isSecure() returns true, there is a security manager in the JVM, and the caller of this method does not posess the "modifyTemplate" FreeMarker permission.
      • checkModifyTemplate

        protected static void checkModifyTemplate()
      • getMacros

        public Map<String,​freemarker.core.ast.Macro> getMacros()
        Throws:
        SecurityException - if the getConfiguration().isSecure() returns true, there is a security manager in the JVM, and the caller of this method does not posess the "modifyTemplate" FreeMarker permission (since both the retrieved map and the macros in it are mutable).
      • dump

        public void dump​(PrintStream ps)
        Dump the raw template in canonical form.
      • getRootElement

        protected freemarker.core.ast.TemplateElement getRootElement()
      • setRootElement

        protected void setRootElement​(freemarker.core.ast.TemplateElement rootElement)