Class LocaleConverter
- java.lang.Object
-
- org.apache.johnzon.mapper.converter.LocaleConverter
-
- All Implemented Interfaces:
Adapter<Locale,String>
,MapperConverter
,TypeAwareAdapter<Locale,String>
public class LocaleConverter extends Object implements TypeAwareAdapter<Locale,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 String
from(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.Type
getFrom()
AdapterKey
getKey()
Type
getTo()
Locale
to(String locale)
Transfer JSONTYPE_TYPE from JSON to POJO as POJO_TYPE.
-
-
-
Field Detail
-
key
private final AdapterKey key
-
-
Method Detail
-
getTo
public Type getTo()
- Specified by:
getTo
in interfaceTypeAwareAdapter<Locale,String>
-
getFrom
public Type getFrom()
- Specified by:
getFrom
in interfaceTypeAwareAdapter<Locale,String>
-
getKey
public AdapterKey getKey()
- Specified by:
getKey
in interfaceTypeAwareAdapter<Locale,String>
-
from
public String from(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.
-
-