Package com.helger.commons.typeconvert
Class TypeConverterProviderBestMatch
- java.lang.Object
-
- com.helger.commons.typeconvert.TypeConverterProviderBestMatch
-
- All Implemented Interfaces:
ITypeConverterProvider
public final class TypeConverterProviderBestMatch extends Object implements ITypeConverterProvider
An type converter provider that tries to provide an exact match before trying fuzzy matches. This should be the preferred type converter provider. Implemented as a singleton.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TypeConverterProviderBestMatchgetInstance()ITypeConverter<Object,Object>getTypeConverter(Class<?> aSrcClass, Class<?> aDstClass)Find a type converter from the source class to the destination class.
-
-
-
Method Detail
-
getInstance
@Nonnull public static TypeConverterProviderBestMatch getInstance()
-
getTypeConverter
@Nullable public ITypeConverter<Object,Object> getTypeConverter(@Nonnull Class<?> aSrcClass, @Nonnull Class<?> aDstClass)
Description copied from interface:ITypeConverterProviderFind a type converter from the source class to the destination class.- Specified by:
getTypeConverterin interfaceITypeConverterProvider- Parameters:
aSrcClass- The source class. May not benull.aDstClass- The destination class. May not benull.- Returns:
nullif no such type converter was found
-
-