public class ConverterUtils extends Object
Modifier and Type | Method and Description |
---|---|
static ConverterHelper |
getBestHelper(Object source,
Variant target,
Resource resource)
Returns the best converter helper matching the given parameters.
|
static <T> ConverterHelper |
getBestHelper(Representation source,
Class<T> target,
Resource 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.
|
public static ConverterHelper getBestHelper(Object source, Variant target, Resource 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, Resource resource)
T
- The target class.source
- The source representation variant.target
- The target class.resource
- The parent resource.public static List<VariantInfo> getVariants(Class<?> sourceClass, Variant targetVariant)
sourceClass
- The source class.targetVariant
- The expected representation metadata.Copyright © 2005–2016. All rights reserved.