public class EntityConverterUtils extends Object
Provides utility methods related to dealing with converters.
Modifier and Type | Method and Description |
---|---|
static <S,T> ValueConverter<S,T> |
getConverterByName(String converterName,
List<? extends ValueConverter<S,T>> converters)
Returns the converter with the given name.
|
static <S,T> ValueConverter<S,T> |
getConverterBySourceValue(Object sourceValue,
List<? extends ValueConverter<S,T>> converters)
Returns the converter that can handle the given source value.
|
static com.google.common.collect.ImmutableList<? extends ValueConverter<String,Object>> |
getPropertyConverters(ConverterProvider converterProvider)
Returns all property converters.
|
static com.google.common.collect.ImmutableList<? extends ValueConverter<Object,Object>> |
getVariableConverters(ConverterProvider converterProvider)
Returns all variable converters.
|
public static com.google.common.collect.ImmutableList<? extends ValueConverter<Object,Object>> getVariableConverters(ConverterProvider converterProvider)
Returns all variable converters.
converterProvider
- the provider from which to retrieve the converterspublic static com.google.common.collect.ImmutableList<? extends ValueConverter<String,Object>> getPropertyConverters(ConverterProvider converterProvider)
Returns all property converters.
converterProvider
- the provider from which to retrieve the converterspublic static <S,T> ValueConverter<S,T> getConverterByName(String converterName, List<? extends ValueConverter<S,T>> converters)
Returns the converter with the given name.
S
- the source typeT
- the target typeconverterName
- the converter name to match against, must not be nullconverters
- the candidate converterspublic static <S,T> ValueConverter<S,T> getConverterBySourceValue(Object sourceValue, List<? extends ValueConverter<S,T>> converters)
Returns the converter that can handle the given source value.
S
- the source typeT
- the target typesourceValue
- the source value to handle, must not be nullconverters
- the candidate convertersCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.