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 | Description |
---|---|---|
static class |
ConversionComparator.Comparison |
Enumeration of possible outcomes of comparing one conversion to another.
|
Modifier and Type | Method | 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. Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 2015, 2016, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Ubuntu+0-9b147-1