Top Description Constructors Methods
sun.text.spi

public abstract Class JavaTimeDateTimePatternProvider

extends LocaleServiceProvider
Class Inheritance
Known Direct Subclasses
sun.util.locale.provider.JavaTimeDateTimePatternImpl
Imports
java.time.DateTimeException, java.util.Locale, java.util.spi.LocaleServiceProvider

Service Provider Interface for retrieving DateTime patterns from specified Locale provider for java.time.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public abstract String

Returns:

formatting pattern String
getJavaTimeDateTimePattern
(int
an int value, representing FormatStyle constant, -1 for date-only pattern
timeStyle
,
int
an int value, representing FormatStyle constant, -1 for time-only pattern
dateStyle
,
String
a String, non-null representing CalendarType such as "japanese", "iso8601"
calType
,
Locale
locale, non-null
locale
)

Returns the formatting pattern for a timeStyle dateStyle, calendarType and locale.

public String

Returns:

formatting pattern String
getJavaTimeDateTimePattern
(String
the requested template, not null
requestedTemplate
,
String
a String, non-null representing CalendarType such as "japanese", "iso8601"
calType
,
Locale
locale, non-null
locale
)

Returns the formatting pattern for the requested template, calendarType, and locale.

Inherited from java.util.spi.LocaleServiceProvider:
getAvailableLocalesisSupportedLocale

Constructor Detail

JavaTimeDateTimePatternProviderback to summary
protected JavaTimeDateTimePatternProvider()

Method Detail

getJavaTimeDateTimePatternback to summary
public abstract String getJavaTimeDateTimePattern(int timeStyle, int dateStyle, String calType, Locale locale)

Returns the formatting pattern for a timeStyle dateStyle, calendarType and locale. Concrete implementation of this method will retrieve a java.time specific dateTime Pattern from the selected Locale Provider.

Parameters
timeStyle:int

an int value, representing FormatStyle constant, -1 for date-only pattern

dateStyle:int

an int value, representing FormatStyle constant, -1 for time-only pattern

calType:String

a String, non-null representing CalendarType such as "japanese", "iso8601"

locale:Locale

locale, non-null

Returns:String

formatting pattern String

Since
9
See Also
java.time.format.DateTimeFormatterBuilder#convertStyle(java.time.format.FormatStyle)
getJavaTimeDateTimePatternback to summary
public String getJavaTimeDateTimePattern(String requestedTemplate, String calType, Locale locale)

Returns the formatting pattern for the requested template, calendarType, and locale. Concrete implementation of this method will retrieve a java.time specific pattern from selected Locale Provider.

Parameters
requestedTemplate:String

the requested template, not null

calType:String

a String, non-null representing CalendarType such as "japanese", "iso8601"

locale:Locale

locale, non-null

Returns:String

formatting pattern String

Exceptions
IllegalArgumentException:
if requestedTemplate does not match the regular expression syntax described in java.time.format.DateTimeFormatterBuilder#appendLocalized(String).
DateTimeException:
if a match for the formatting pattern for requestedTemplate is not available
Since
19