public class ConverterUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
protected static java.util.List<VariantInfo> |
addVariant(java.util.List<VariantInfo> variants,
VariantInfo variant)
Adds a variant to the given list.
|
static ConverterHelper |
getBestHelper(java.lang.Object source,
Variant target,
UniformResource resource)
Returns the best converter helper matching the given parameters.
|
static <T> ConverterHelper |
getBestHelper(Representation source,
java.lang.Class<T> target,
UniformResource resource)
Returns the best converter helper matching the given parameters.
|
static java.util.List<VariantInfo> |
getVariants(java.lang.Class<?> sourceClass,
Variant targetVariant)
Returns the list of variants that can be converted from a given object
class.
|
protected static java.util.List<VariantInfo> addVariant(java.util.List<VariantInfo> variants, VariantInfo variant)
variants
- The list to update.variant
- The variant info to add.public static java.util.List<VariantInfo> getVariants(java.lang.Class<?> sourceClass, Variant targetVariant)
sourceClass
- The source class.targetVariant
- The expected representation metadata.public static ConverterHelper getBestHelper(java.lang.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, java.lang.Class<T> target, UniformResource resource)
T
- The target class.source
- The source representation variant.target
- The target class.resource
- The parent resource.Copyright © 2005-2012. All Rights Reserved.