81 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
81 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
82 */ |
82 */ |
83 |
83 |
84 package jdk.internal.dynalink.linker; |
84 package jdk.internal.dynalink.linker; |
85 |
85 |
|
86 import jdk.internal.dynalink.beans.BeansLinker; |
86 import jdk.internal.dynalink.support.TypeUtilities; |
87 import jdk.internal.dynalink.support.TypeUtilities; |
87 |
88 |
88 /** |
89 /** |
89 * Optional interface that can be implemented by {@link GuardingDynamicLinker} implementations to provide |
90 * Optional interface that can be implemented by {@link GuardingDynamicLinker} implementations to provide |
90 * language-runtime specific implicit type conversion capabilities. Note that if you implement this interface, you will |
91 * language-runtime specific implicit type conversion capabilities. Note that if you implement this interface, you will |
91 * very likely want to implement {@link ConversionComparator} interface too, as your additional language-specific |
92 * very likely want to implement {@link ConversionComparator} interface too, as your additional language-specific |
92 * conversions, in absence of a strategy for prioritizing these conversions, will cause more ambiguity in selecting the |
93 * conversions, in absence of a strategy for prioritizing these conversions, will cause more ambiguity for |
93 * correct overload when trying to link to an overloaded POJO method. |
94 * {@link BeansLinker} in selecting the correct overload when trying to link to an overloaded Java method. |
94 */ |
95 */ |
95 public interface GuardingTypeConverterFactory { |
96 public interface GuardingTypeConverterFactory { |
96 /** |
97 /** |
97 * Returns a guarded type conversion that receives an Object of the specified source type and returns an Object |
98 * Returns a guarded type conversion that receives an Object of the specified source type and returns an Object |
98 * converted to the specified target type. The type of the invocation is targetType(sourceType), while the type of |
99 * converted to the specified target type. The type of the invocation is targetType(sourceType), while the type of |