Package org.apache.dubbo.common.convert
Class ConverterUtil
java.lang.Object
org.apache.dubbo.common.convert.ConverterUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TconvertIfPossible(Object source, Class<T> targetType) Convert the value of source to target-type value if possibleConverter<?, ?> getConverter(Class<?> sourceType, Class<?> targetType) Get the Converter instance fromExtensionLoaderwith the specified source and target type
-
Constructor Details
-
ConverterUtil
-
-
Method Details
-
getConverter
Get the Converter instance fromExtensionLoaderwith the specified source and target type- Parameters:
sourceType- the source typetargetType- the target type- Returns:
- See Also:
-
convertIfPossible
Convert the value of source to target-type value if possible- Type Parameters:
T- the target type- Parameters:
source- the value of sourcetargetType- the target type- Returns:
nullif can't be converted- Since:
- 2.7.8
-