Package | Description |
---|---|
freemarker.core |
The seldom used or advanced parts of the fundamental FreeMarker API, compared to
freemarker.template . |
Modifier and Type | Class and Description |
---|---|
class |
InvalidFormatParametersException
Used when creating
TemplateDateFormat -s and TemplateNumberFormat -s to indicate that the parameters
part of the format string (like some kind of pattern) is malformed. |
class |
InvalidFormatStringException
Used when creating
TemplateDateFormat -s and TemplateNumberFormat -s to indicate that the format
string (like the value of the dateFormat setting) is malformed. |
class |
ParsingNotSupportedException
Thrown when the
TemplateValueFormat doesn't support parsing, and parsing was invoked. |
class |
UndefinedCustomFormatException |
class |
UnformattableValueException
Thrown when a
TemplateModel can't be formatted because of the value/properties of it are outside of that the
TemplateValueFormat supports. |
class |
UnknownDateTypeFormattingUnsupportedException
Thrown when a
TemplateDateModel can't be formatted because its type is TemplateDateModel.UNKNOWN . |
class |
UnknownDateTypeParsingUnsupportedException
Thrown when a string can't be parsed to
TemplateDateModel , because the provided target type is
TemplateDateModel.UNKNOWN . |
class |
UnparsableValueException
Thrown when the content of the string that should be parsed by the
TemplateValueFormat doesn't match what the
format expects. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
TemplateDateFormat.format(TemplateDateModel dateModel)
Formats the model to markup instead of to plain text if the result markup will be more than just plain text
escaped, otherwise falls back to formatting to plain text.
|
java.lang.Object |
TemplateNumberFormat.format(TemplateNumberModel numberModel)
Formats the model to markup instead of to plain text if the result markup will be more than just plain text
escaped, otherwise falls back to formatting to plain text.
|
abstract java.lang.String |
TemplateDateFormat.formatToPlainText(TemplateDateModel dateModel) |
abstract java.lang.String |
TemplateNumberFormat.formatToPlainText(TemplateNumberModel numberModel) |
abstract TemplateDateFormat |
TemplateDateFormatFactory.get(java.lang.String params,
int dateType,
java.util.Locale locale,
java.util.TimeZone timeZone,
boolean zonelessInput,
Environment env)
Returns a formatter for the given parameters.
|
TemplateDateFormat |
AliasTemplateDateFormatFactory.get(java.lang.String params,
int dateType,
java.util.Locale locale,
java.util.TimeZone timeZone,
boolean zonelessInput,
Environment env) |
abstract TemplateNumberFormat |
TemplateNumberFormatFactory.get(java.lang.String params,
java.util.Locale locale,
Environment env)
Returns a formatter for the given parameters.
|
TemplateNumberFormat |
AliasTemplateNumberFormatFactory.get(java.lang.String params,
java.util.Locale locale,
Environment env) |
TemplateDateFormat |
Environment.getTemplateDateFormat(int dateType,
java.lang.Class<? extends java.util.Date> dateClass)
Gets a
TemplateDateFormat using the date/time/datetime format settings and the current locale and time
zone. |
TemplateDateFormat |
Environment.getTemplateDateFormat(java.lang.String formatString,
int dateType,
java.lang.Class<? extends java.util.Date> dateClass)
Gets a
TemplateDateFormat for the specified format string and the current locale and time zone. |
TemplateDateFormat |
Environment.getTemplateDateFormat(java.lang.String formatString,
int dateType,
java.lang.Class<? extends java.util.Date> dateClass,
java.util.Locale locale)
Like
Environment.getTemplateDateFormat(String, int, Class) , but allows you to use a different locale than the
current one. |
TemplateDateFormat |
Environment.getTemplateDateFormat(java.lang.String formatString,
int dateType,
java.lang.Class<? extends java.util.Date> dateClass,
java.util.Locale locale,
java.util.TimeZone timeZone,
java.util.TimeZone sqlDateAndTimeTimeZone)
Like
Environment.getTemplateDateFormat(String, int, Class) , but allows you to use a different locale and time zone
than the current one. |
TemplateDateFormat |
Environment.getTemplateDateFormat(java.lang.String formatString,
int dateType,
java.util.Locale locale,
java.util.TimeZone timeZone,
boolean zonelessInput)
Gets a
TemplateDateFormat for the specified parameters. |
TemplateNumberFormat |
Environment.getTemplateNumberFormat()
Returns the current number format (
Configurable.getNumberFormat() ) as TemplateNumberFormat . |
TemplateNumberFormat |
Environment.getTemplateNumberFormat(java.lang.String formatString)
Returns the number format as
TemplateNumberFormat for the given format string and the current locale. |
TemplateNumberFormat |
Environment.getTemplateNumberFormat(java.lang.String formatString,
java.util.Locale locale)
Returns the number format as
TemplateNumberFormat , for the given format string and locale. |
java.lang.Object |
TemplateNumberFormat.parse(java.lang.String s)
This method is reserved for future purposes; currently it always throws
ParsingNotSupportedException . |
abstract java.lang.Object |
TemplateDateFormat.parse(java.lang.String s,
int dateType)
Parsers a string to date/time/datetime, according to this format.
|