public interface GuardingTypeConverterFactory
GuardingDynamicLinker
implementations to provide
language-runtime specific implicit type conversion capabilities. Note that if you implement this interface, you will
very likely want to implement ConversionComparator
interface too, as your additional language-specific
conversions, in absence of a strategy for prioritizing these conversions, will cause more ambiguity in selecting the
correct overload when trying to link to an overloaded POJO method.Modifier and Type | Method and Description |
---|---|
GuardedInvocation |
convertToType(Class<?> sourceType,
Class<?> targetType)
Returns a guarded invocation that receives an Object of the specified source type and returns an Object converted
to the specified target type.
|
GuardedInvocation convertToType(Class<?> sourceType, Class<?> targetType) throws Exception
TypeUtilities.isMethodInvocationConvertible(Class, Class)
for details. An
implementation can assume it is never requested to produce a converter for these conversions.sourceType
- source typetargetType
- the target type.Exception
- if there was an error during creation of the converterCopyright © 2014 Attila Szegedi. All rights reserved.