Package freemarker.core
Class TemplateCore
java.lang.Object
freemarker.core.Configurable
freemarker.core.TemplateCore
- Direct Known Subclasses:
Template
Abstract base class for
Template. Used to provide package-level
access to secured internals used by Environment.-
Nested Class Summary
Nested classes/interfaces inherited from class freemarker.core.Configurable
Configurable.UnknownSettingException -
Field Summary
Fields inherited from class freemarker.core.Configurable
ARITHMETIC_ENGINE_KEY, BOOLEAN_FORMAT_KEY, DATE_FORMAT_KEY, DATETIME_FORMAT_KEY, LOCALE_KEY, NUMBER_FORMAT_KEY, OBJECT_WRAPPER_KEY, OUTPUT_ENCODING_KEY, STRICT_BEAN_MODELS, TEMPLATE_EXCEPTION_HANDLER_KEY, TIME_FORMAT_KEY, TIME_ZONE_KEY, URL_ESCAPING_CHARSET_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMacro(freemarker.core.ast.Macro macro) Called by code internally to maintain a table of macrosprotected static voidvoiddump(PrintStream ps) Dump the raw template in canonical form.voidDump the raw template in canonical form.protected freemarker.core.ast.TemplateElementprotected voidsetRootElement(freemarker.core.ast.TemplateElement rootElement) Methods inherited from class freemarker.core.Configurable
clone, doAutoImportsAndIncludes, getArithmeticEngine, getBooleanFormat, getBooleanFormat, getCustomAttribute, getCustomAttributeNames, getDateFormat, getDateTimeFormat, getEnvironment, getLocale, getNumberFormat, getObjectWrapper, getOutputEncoding, getParent, getSetting, getSettings, getTemplateExceptionHandler, getTimeFormat, getTimeZone, getURLEscapingCharset, invalidSettingValueException, removeCustomAttribute, setArithmeticEngine, setBooleanFormat, setCustomAttribute, setDateFormat, setDateTimeFormat, setLocale, setNumberFormat, setNumbersForComputers, setObjectWrapper, setOutputEncoding, setParent, setSetting, setSettings, setSettings, setStrictBeanModels, setTemplateExceptionHandler, setTimeFormat, setTimeZone, setURLEscapingCharset, unknownSettingException
-
Constructor Details
-
TemplateCore
-
-
Method Details
-
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
- 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
Dump the raw template in canonical form. -
dump
Dump the raw template in canonical form.- Throws:
IOException
-
getRootElement
protected freemarker.core.ast.TemplateElement getRootElement() -
setRootElement
protected void setRootElement(freemarker.core.ast.TemplateElement rootElement)
-