public interface ConversionComparator
GuardingTypeConverterFactory
implementers. Language-specific
conversions can cause increased overloaded method resolution ambiguity, as many methods can become applicable because
of additional conversions. The static way of selecting the "most specific" method will fail more often, because there
will be multiple maximally specific method with unrelated signatures. In these cases, language runtimes can be asked
to resolve the ambiguity by expressing preferences for one conversion over the other.Modifier and Type | Interface and Description |
---|---|
static class |
ConversionComparator.Comparison
Enumeration of possible outcomes of comparing one conversion to another.
|
Modifier and Type | Method and Description |
---|---|
ConversionComparator.Comparison |
compareConversion(Class<?> sourceType,
Class<?> targetType1,
Class<?> targetType2)
Determines which of the two target types is the preferred conversion target from a source type.
|
ConversionComparator.Comparison compareConversion(Class<?> sourceType, Class<?> targetType1, Class<?> targetType2)
sourceType
- the source type.targetType1
- one potential target typetargetType2
- another potential target type.Copyright © 2014 Attila Szegedi. All rights reserved.