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 AdapterKeykey
-
Constructor Summary
Constructors Constructor Description LocaleConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringfrom(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.TypegetFrom()AdapterKeygetKey()TypegetTo()Localeto(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:
getToin interfaceTypeAwareAdapter<Locale,String>
-
getFrom
public Type getFrom()
- Specified by:
getFromin interfaceTypeAwareAdapter<Locale,String>
-
getKey
public AdapterKey getKey()
- Specified by:
getKeyin interfaceTypeAwareAdapter<Locale,String>
-
from
public String from(Locale instance)
Description copied from interface:AdapterTake the POJO_TYPE object A from a POJO an convert it to JSON_TYPE which will be inserted into the JSON output.
-
-