public class ConverterAdapter<A> extends Object implements TypeAwareAdapter<A,String>
Modifier and Type | Field and Description |
---|---|
private Converter<A> |
converter |
private AdapterKey |
key |
Constructor and Description |
---|
ConverterAdapter(Converter<A> converter,
Type from) |
Modifier and Type | Method and Description |
---|---|
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() |
Type |
getFrom() |
AdapterKey |
getKey() |
Type |
getTo() |
A |
to(String s)
Transfer JSONTYPE_TYPE from JSON to POJO as POJO_TYPE.
|
private final AdapterKey key
public A to(String s)
Adapter
public String from(A a)
Adapter
public Type getTo()
getTo
in interface TypeAwareAdapter<A,String>
public Type getFrom()
getFrom
in interface TypeAwareAdapter<A,String>
public AdapterKey getKey()
getKey
in interface TypeAwareAdapter<A,String>
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.