Package freemarker.core
package freemarker.core
The seldom used or advanced parts of the fundamental FreeMarker API, compared to
freemarker.template.
This package also encloses FreeMarker's core parsing/rendering functionality.-
Interface SummaryInterfaceDescriptionGives information about the place where a directive is called from, also lets you attach a custom data object to that place.Don't implement this interface yourself; use the existing implementation(s).Used by built-ins and other template language features that get a class based on a string.TemplateMarkupOutputModel<MO extends TemplateMarkupOutputModel<MO>>"markup output" template language data-type; stores markup (some kind of "rich text" / structured format, as opposed to plain text) that meant to be printed as template output.Hooks to monitor as templates run.Information about the template element that we enter of exit; do NOT implement this (outside FreeMarker), as new methods can be added to this anytime!
-
Class SummaryClassDescriptionDefines the methods in
CFormatthat are the same for all JSON-like languages.Creates an alias to another format, so that the format can be referred to with a simple name in the template, rather than as a concrete pattern or other kind of format string.Creates an alias to another format, so that the format can be referred to with a simple name in the template, rather than as a concrete pattern or other kind of format string.Used for implementing the arithmetic operations and number comparisons in the template language.This is the default arithmetic engine in FreeMarker.An arithmetic engine that conservatively widens the operation arguments to extent that they can hold the result of the operation.Defines a format (usually a computer language) that's used by thec,cnbuilt-ins, and for the"c"and"computer"number_format, and the"c"boolean_format.Represents two markup formats nested into each other.Deprecated.Will be removed (main method in a library, often classified as CWE-489 "Leftover Debug Code").Common superclass for implementingMarkupOutputFormat-s that use aCommonTemplateMarkupOutputModelsubclass.CommonTemplateMarkupOutputModel<MO extends CommonTemplateMarkupOutputModel<MO>>Common superclass for implementingTemplateMarkupOutputModel-s that belong to aCommonMarkupOutputFormatsubclass format.Represents the CSS output format (MIME type "text/css", name "CSS").The defaultTruncateBuiltinAlgorithmimplementation; seeConfigurable.setTruncateBuiltinAlgorithm(TruncateBuiltinAlgorithm).Object that represents the runtime environment during template processing.Deprecated.Will be removed, as Swing classes aren't accessible on Google App Engine.Represents the HTML output format (MIME type "text/html", name "HTML")."JavaScript"CFormat, to be used when generating JavaScript (and not JSON), except, in most casesJavaScriptOrJSONCFormatis recommended over this."JavaScript or JSON"CFormat; for generating output that's compatible with both JSON and JavaScript.Represents the JavaScript output format (MIME type "application/javascript", name "JavaScript")."JSON"CFormat; to be used when generating JSON (and not JavaScript), except, in most casesJavaScriptOrJSONCFormatis recommended over this.Represents the JSON output format (MIME type "application/json", name "JSON").MarkupOutputFormat<MO extends TemplateMarkupOutputModel>Superclass ofOutputFormat-s that represent a "markup" format, which is any format where certain character sequences have special meaning, and thus may need escaping.ATemplateClassResolverthat resolves only the classes whose name was specified in the constructor.Represents an output format.Represents the plain text output format (MIME type "text/plain", name "plainText").Represents the Rich Text Format output format (MIME type "application/rtf", name "RTF").Stores combined markup to be printed; used withCombinedMarkupOutputFormat.Used for customizing the configuration settings for individualTemplate-s (or rather groups of templates), relatively to the common setting values coming from theConfiguration.Represents a date/time/dateTime format; used in templates for formatting and parsing with that format.Factory for a certain kind of date/time/dateTime formatting (TemplateDateFormat).Utility classes for implementingTemplateValueFormat-s.Stores HTML markup to be printed; used withHTMLOutputFormat.Represents a number format; used in templates for formatting and parsing with that format.Factory for a certain kind of number formatting (TemplateNumberFormat).Stores RTF markup to be printed; used withRTFOutputFormat.Superclass of all value format objects; objects that convert values to strings, or parse strings.Superclass of all format factories.Stores HTML markup to be printed; used withHTMLOutputFormat.Stores XML markup to be printed; used withXMLOutputFormat.Used for implementing the "truncate" family of built-ins.Represents the output format used when the template output format is undecided.Represents the XML output format (MIME type "application/xhtml+xml", name "XHTML"); this behaves identically toHTMLOutputFormat, except that the name an the MIME Type differs.Represents the XML output format (MIME type "application/xml", name "XML"). -
Exception SummaryExceptionDescriptionAn unexpected state was reached that is certainly caused by a bug in FreeMarker.The setting name was recognized, but its value couldn't be parsed or the setting couldn't be set for some other reason.The setting name was not recognized.Used when creating
TemplateDateFormat-s andTemplateNumberFormat-s to indicate that the parameters part of the format string (like some kind of pattern) is malformed.Used when creatingTemplateDateFormat-s andTemplateNumberFormat-s to indicate that the format string (like the value of thedateFormatsetting) is malformed.A subclass ofTemplateExceptionthat says that an FTL expression has evaluated tonullor it refers to something that doesn't exist.Indicates that aTemplateBooleanModelvalue was expected, but the value had a different type.Indicates that aTemplateDateModelvalue was expected, but the value had a different type.Indicates that aTemplateHashModelExvalue was expected, but the value had a different type.Indicates that aTemplateNodeModelExvalue was expected, but the value had a different type.Indicates that aTemplateHashModelvalue was expected, but the value had a different type.Indicates that aTemplateMarkupOutputModelvalue was expected, but the value had a different type.Indicates that aTemplateMethodModelvalue was expected, but the value had a different type.Indicates that aTemplateNodeModelvalue was expected, but the value had a different type.Indicates that aTemplateNumberModelvalue was expected, but the value had a different type.Indicates that aTemplateSequenceModelvalue was expected, but the value had a different type.Indicates that aTemplateSequenceModelorTemplateCollectionModelvalue was expected, but the value had a different type.Indicates that aTemplateScalarModelvalue was expected (or maybe something that can be automatically coerced to that), but the value had a different type.Indicates that aTemplateScalarModel(or maybe something that can be automatically coerced to that) orTemplateMarkupOutputModelvalue was expected, but the value had a different type.Parsing-time exception in a template (as opposed to a runtime exception, aTemplateException).Thrown when theTemplateValueFormatdoesn't support parsing, and parsing was invoked.This exception is thrown when a#stopdirective is encountered.Error while getting, creating or applyingTemplateValueFormat-s (including its subclasses, likeTemplateNumberFormat).The type of a value differs from what was expected.Thrown when aTemplateModelcan't be formatted because of the value/properties of it are outside of that theTemplateValueFormatsupports.Thrown when aTemplateDateModelcan't be formatted because its type isTemplateDateModel.UNKNOWN.Thrown when a string can't be parsed toTemplateDateModel, because the provided target type isTemplateDateModel.UNKNOWN.Thrown when the content of the string that should be parsed by theTemplateValueFormatdoesn't match what the format expects.