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 | Class and Description |
|---|---|
| public static enum | ConversionComparator.
Enumeration of possible outcomes of comparing one conversion to another. |
| Modifier and Type | Method and Description |
|---|---|
| public ConversionComparator. | Returns: one of Comparison constants that establish which - if any - of the target types is preferred for the conversion.the source type. sourceType, Class<?> one potential target type targetType1, Class<?> another potential target type. targetType2)Determines which of the two target types is the preferred conversion target from a source type. |
| compareConversion | back to summary |
|---|---|
| public ConversionComparator. Determines which of the two target types is the preferred conversion target from a source type.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final ConversionComparator. | INDETERMINATE
The conversions cannot be compared. |
| public static final ConversionComparator. | TYPE_1_BETTER
The first conversion is better than the second one. |
| public static final ConversionComparator. | TYPE_2_BETTER
The second conversion is better than the first one. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ConversionComparator. | |
| public static ConversionComparator. |
| INDETERMINATE | back to summary |
|---|---|
| public static final ConversionComparator. The conversions cannot be compared. | |
| TYPE_1_BETTER | back to summary |
|---|---|
| public static final ConversionComparator. The first conversion is better than the second one. | |
| TYPE_2_BETTER | back to summary |
|---|---|
| public static final ConversionComparator. The second conversion is better than the first one. | |
| Comparison | back to summary |
|---|---|
| private Comparison() | |
| valueOf | back to summary |
|---|---|
| public static ConversionComparator. | |
| values | back to summary |
|---|---|
| public static ConversionComparator. | |