|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.engine.converter.ConverterUtils
public class ConverterUtils
Utilities for the converter service.
Method Summary | ||
---|---|---|
protected static List<VariantInfo> |
addVariant(List<VariantInfo> variants,
VariantInfo variant)
Adds a variant to the given list. |
|
static ConverterHelper |
getBestHelper(Object source,
Variant target,
UniformResource resource)
Returns the best converter helper matching the given parameters. |
|
static
|
getBestHelper(Representation source,
Class<T> target,
UniformResource resource)
Returns the best converter helper matching the given parameters. |
|
static List<VariantInfo> |
getVariants(Class<?> sourceClass,
Variant targetVariant)
Returns the list of variants that can be converted from a given object class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
protected static List<VariantInfo> addVariant(List<VariantInfo> variants, VariantInfo variant)
variants
- The list to update.variant
- The variant info to add.
public static List<VariantInfo> getVariants(Class<?> sourceClass, Variant targetVariant)
sourceClass
- The source class.targetVariant
- The expected representation metadata.
public static ConverterHelper getBestHelper(Object source, Variant target, UniformResource resource)
source
- The object to convert to a representation.target
- The target representation variant.resource
- The optional parent resource.
public static <T> ConverterHelper getBestHelper(Representation source, Class<T> target, UniformResource resource)
T
- The target class.source
- The source representation variant.target
- The target class.resource
- The parent resource.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |