public class JacksonConverter extends ConverterHelper
| Constructor and Description |
|---|
JacksonConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> JacksonRepresentation<T> |
create(MediaType mediaType,
T source)
Creates the marshaling
JacksonRepresentation. |
protected <T> JacksonRepresentation<T> |
create(Representation source,
Class<T> objectClass)
Creates the unmarshaling
JacksonRepresentation. |
List<Class<?>> |
getObjectClasses(Variant source) |
List<VariantInfo> |
getVariants(Class<?> source) |
protected boolean |
isCompatible(Variant variant)
Indicates if the given variant is compatible with the media types
supported by this converter.
|
float |
score(Object source,
Variant target,
Resource resource) |
<T> float |
score(Representation source,
Class<T> target,
Resource resource) |
<T> T |
toObject(Representation source,
Class<T> target,
Resource resource) |
Representation |
toRepresentation(Object source,
Variant target,
Resource resource) |
<T> void |
updatePreferences(List<Preference<MediaType>> preferences,
Class<T> entity) |
addObjectClass, addVariant, addVariants, getVariants, updatePreferencesprotected <T> JacksonRepresentation<T> create(MediaType mediaType, T source)
JacksonRepresentation.T - mediaType - The target media type.source - The source object to marshal.JacksonRepresentation.protected <T> JacksonRepresentation<T> create(Representation source, Class<T> objectClass)
JacksonRepresentation.T - source - The source representation to unmarshal.objectClass - The object class to instantiate.JacksonRepresentation.public List<Class<?>> getObjectClasses(Variant source)
getObjectClasses in class ConverterHelperpublic List<VariantInfo> getVariants(Class<?> source)
getVariants in class ConverterHelperprotected boolean isCompatible(Variant variant)
variant - The variant.public float score(Object source, Variant target, Resource resource)
score in class ConverterHelperpublic <T> float score(Representation source, Class<T> target, Resource resource)
score in class ConverterHelperpublic <T> T toObject(Representation source, Class<T> target, Resource resource) throws IOException
toObject in class ConverterHelperIOExceptionpublic Representation toRepresentation(Object source, Variant target, Resource resource)
toRepresentation in class ConverterHelperpublic <T> void updatePreferences(List<Preference<MediaType>> preferences, Class<T> entity)
updatePreferences in class ConverterHelperCopyright © 2005-2017 Restlet.