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