- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentHashMap<AdapterKey,Adapter<?,?>>
-
- org.apache.johnzon.mapper.map.LazyConverterMap
-
- All Implemented Interfaces:
java.io.Serializable,java.util.concurrent.ConcurrentMap<AdapterKey,Adapter<?,?>>,java.util.Map<AdapterKey,Adapter<?,?>>
public class LazyConverterMap extends java.util.concurrent.ConcurrentHashMap<AdapterKey,Adapter<?,?>>
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
java.util.concurrent.ConcurrentHashMap.KeySetView<K extends java.lang.Object,V extends java.lang.Object>
-
-
Field Summary
Fields Modifier and Type Field Description private java.time.format.DateTimeFormatterdateTimeFormatterprivate static Adapter<?,?>NO_ADAPTERprivate booleanuseBigDecimalStringAdapterprivate booleanuseBigIntegerStringAdapterprivate booleanuseShortISO8601Format
-
Constructor Summary
Constructors Constructor Description LazyConverterMap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<AdapterKey>adapterKeys()private Adapter<?,?>add(AdapterKey key, Adapter<?,?> converter)private Adapter<?,?>addCalendarConverter(AdapterKey key)private Adapter<?,?>addDateConverter(AdapterKey key)private Adapter<?,?>addGregorianCalendar(AdapterKey key)private Adapter<?,?>addInstantConverter(AdapterKey key)private Adapter<?,?>addLocalDateConverter(AdapterKey key)private Adapter<?,?>addLocalDateTimeConverter(AdapterKey key)private Adapter<?,?>addOffsetDateTimeConverter(AdapterKey key)private Adapter<?,?>addZonedDateTimeConverter(AdapterKey key)private static voidcheckForDeprecatedTimeZone(java.lang.String text)private Adapter<?,?>doLazyLookup(AdapterKey key)java.util.Set<java.util.Map.Entry<AdapterKey,Adapter<?,?>>>entrySet()private <T extends java.util.Calendar>
TfromCalendar(java.lang.String text, java.util.function.Function<java.time.ZonedDateTime,T> calendarSupplier)Adapter<?,?>get(java.lang.Object key)private booleanhasTime(java.util.Calendar instance)private static java.time.ZonedDateTimeparseZonedDateTime(java.lang.String text, java.time.format.DateTimeFormatter formatter, java.time.ZoneId defaultZone)voidsetDateTimeFormatter(java.time.format.DateTimeFormatter dateTimeFormatter)voidsetUseBigDecimalStringAdapter(boolean useBigDecimalStringAdapter)voidsetUseBigIntegerStringAdapter(boolean useBigIntegerStringAdapter)voidsetUseShortISO8601Format(boolean useShortISO8601Format)private java.lang.StringtoStringCalendar(java.util.Calendar instance)-
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
-
-
-
-
Field Detail
-
NO_ADAPTER
private static final Adapter<?,?> NO_ADAPTER
-
useShortISO8601Format
private boolean useShortISO8601Format
-
dateTimeFormatter
private java.time.format.DateTimeFormatter dateTimeFormatter
-
useBigIntegerStringAdapter
private boolean useBigIntegerStringAdapter
-
useBigDecimalStringAdapter
private boolean useBigDecimalStringAdapter
-
-
Method Detail
-
setUseShortISO8601Format
public void setUseShortISO8601Format(boolean useShortISO8601Format)
-
setDateTimeFormatter
public void setDateTimeFormatter(java.time.format.DateTimeFormatter dateTimeFormatter)
-
setUseBigDecimalStringAdapter
public void setUseBigDecimalStringAdapter(boolean useBigDecimalStringAdapter)
-
setUseBigIntegerStringAdapter
public void setUseBigIntegerStringAdapter(boolean useBigIntegerStringAdapter)
-
get
public Adapter<?,?> get(java.lang.Object key)
- Specified by:
getin interfacejava.util.Map<AdapterKey,Adapter<?,?>>- Overrides:
getin classjava.util.concurrent.ConcurrentHashMap<AdapterKey,Adapter<?,?>>
-
entrySet
public java.util.Set<java.util.Map.Entry<AdapterKey,Adapter<?,?>>> entrySet()
- Specified by:
entrySetin interfacejava.util.Map<AdapterKey,Adapter<?,?>>- Overrides:
entrySetin classjava.util.concurrent.ConcurrentHashMap<AdapterKey,Adapter<?,?>>
-
adapterKeys
public java.util.Set<AdapterKey> adapterKeys()
-
doLazyLookup
private Adapter<?,?> doLazyLookup(AdapterKey key)
-
addOffsetDateTimeConverter
private Adapter<?,?> addOffsetDateTimeConverter(AdapterKey key)
-
addZonedDateTimeConverter
private Adapter<?,?> addZonedDateTimeConverter(AdapterKey key)
-
addLocalDateTimeConverter
private Adapter<?,?> addLocalDateTimeConverter(AdapterKey key)
-
addLocalDateConverter
private Adapter<?,?> addLocalDateConverter(AdapterKey key)
-
addInstantConverter
private Adapter<?,?> addInstantConverter(AdapterKey key)
-
addGregorianCalendar
private Adapter<?,?> addGregorianCalendar(AdapterKey key)
-
addCalendarConverter
private Adapter<?,?> addCalendarConverter(AdapterKey key)
-
addDateConverter
private Adapter<?,?> addDateConverter(AdapterKey key)
-
parseZonedDateTime
private static java.time.ZonedDateTime parseZonedDateTime(java.lang.String text, java.time.format.DateTimeFormatter formatter, java.time.ZoneId defaultZone)
-
checkForDeprecatedTimeZone
private static void checkForDeprecatedTimeZone(java.lang.String text)
-
toStringCalendar
private java.lang.String toStringCalendar(java.util.Calendar instance)
-
hasTime
private boolean hasTime(java.util.Calendar instance)
-
fromCalendar
private <T extends java.util.Calendar> T fromCalendar(java.lang.String text, java.util.function.Function<java.time.ZonedDateTime,T> calendarSupplier)
-
add
private Adapter<?,?> add(AdapterKey key, Adapter<?,?> converter)
-
-