Class LocaleConverter
- java.lang.Object
-
- org.apache.johnzon.mapper.converter.LocaleConverter
-
- All Implemented Interfaces:
Adapter<java.util.Locale,java.lang.String>
,MapperConverter
,TypeAwareAdapter<java.util.Locale,java.lang.String>
public class LocaleConverter extends java.lang.Object implements TypeAwareAdapter<java.util.Locale,java.lang.String>
-
-
Field Summary
Fields Modifier and Type Field Description private AdapterKey
key
-
Constructor Summary
Constructors Constructor Description LocaleConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
from(java.util.Locale instance)
Take the POJO_TYPE object A from a POJO an convert it to JSON_TYPE which will be inserted into the JSON output.java.lang.reflect.Type
getFrom()
AdapterKey
getKey()
java.lang.reflect.Type
getTo()
java.util.Locale
to(java.lang.String locale)
Transfer JSONTYPE_TYPE from JSON to POJO as POJO_TYPE.
-
-
-
Field Detail
-
key
private final AdapterKey key
-
-
Method Detail
-
getTo
public java.lang.reflect.Type getTo()
- Specified by:
getTo
in interfaceTypeAwareAdapter<java.util.Locale,java.lang.String>
-
getFrom
public java.lang.reflect.Type getFrom()
- Specified by:
getFrom
in interfaceTypeAwareAdapter<java.util.Locale,java.lang.String>
-
getKey
public AdapterKey getKey()
- Specified by:
getKey
in interfaceTypeAwareAdapter<java.util.Locale,java.lang.String>
-
from
public java.lang.String from(java.util.Locale instance)
Description copied from interface:Adapter
Take the POJO_TYPE object A from a POJO an convert it to JSON_TYPE which will be inserted into the JSON output.
-
-