Package freemarker.template.utility
Various classes used by core FreeMarker code but might be useful outside of it too.
-
Interface Summary Interface Description DateUtil.CalendarFieldsToDateConverter Used internally byDateUtil
; don't use its implementations for anything else.DateUtil.DateToISO8601CalendarFactory Used internally byDateUtil
; don't use its implementations for anything else.ObjectFactory<T> Used for the trivial cases of the factory pattern.ObjectWrapperWithAPISupport Experimental - subject to change: Implemented byObjectWrapper
-s to helpTemplateModel
-s to implement thesomeValue?api
operation.RichObjectWrapper Experimental - subject to change: Union of the interfaces that a typical feature richObjectWrapper
is expected to implement.WriteProtectable Implemented by objects that can be made permanently read-only. -
Class Summary Class Description CaptureOutput Deprecated. Use block-assignments instead, like<assign x>...</assign>
.ClassUtil Collections12 Deprecated. Not needed anymore, as FreeMarker now requires higher than Java 1.3CollectionUtils Constants Frequently used constantTemplateModel
values.DateUtil Date and time related utilities.DateUtil.TrivialCalendarFieldsToDateConverter Non-thread-safe implementation that hard-references a calendar internally.DateUtil.TrivialDateToISO8601CalendarFactory Non-thread-safe factory that hard-references a calendar internally.DeepUnwrap Utility methods for unwrappingTemplateModel
-s.DOMNodeModel Deprecated. UseNodeModel
insteadExecute Gives FreeMarker the the ability to execute external commands.HtmlEscape Performs an HTML escape of a given template fragment.JythonRuntime A crude first pass at an embeddable Jython interpreterNormalizeNewlines Transformer that supports FreeMarker legacy behavior: all newlines appearing within the transformed area will be transformed into the platform's default newline.NullWriter AWriter
that simply drops what it gets.NumberUtil Number- and math-related utilities.ObjectConstructor An object that you can make available in a template to instantiate arbitrary beans-wrapped objects in a template.OptimizerUtil SecurityUtilities StandardCompress A filter that compresses each sequence of consecutive whitespace to a single line break (if the sequence contains a line break) or a single space.StringUtil Some text related utilities.TemplateModelUtils Static utility method related toTemplateModel
-s that didn't fit elsewhere.ToCanonical Deprecated. Will be removed (main method in a library, often classified as CWE-489 "Leftover Debug Code").XmlEscape Performs an XML escaping of a given template fragment. -
Exception Summary Exception Description DateUtil.DateParseException NullArgumentException Indicates that an argument that must be non-null
wasnull
.UndeclaredThrowableException The equivalent of JDK 1.3 UndeclaredThrowableException.UnrecognizedTimeZoneException Indicates that the time zone name is not recognized.UnsupportedNumberClassException Thrown when FreeMarker runs into aNumber
subclass that it doesn't yet support.