APIdia Launch Partner
Top Description Constructors Methods
jdk.dynalink.beans

pack-priv Class MaximallySpecific

extends Object
Class Inheritance
Imports
java.lang.invoke.MethodHandle, .MethodType, java.util.Iterator, .LinkedList, .List, java.util.function.Function, jdk.dynalink.linker.ConversionComparator.Comparison, .LinkerServices, jdk.dynalink.linker.support.TypeUtilities

Utility class that encapsulates the algorithm for choosing the maximally specific methods.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static ConversionComparator.Comparison
compare(final Class<?> c1, final Class<?> c2, final Class<?>[] argTypes, final int i, final LinkerServices cmp)

pack-priv static List<MethodHandle>

Returns:

the list of maximally specific method handles.
getMaximallySpecificMethodHandles
(final List<MethodHandle>
the list of method handles
methods
,
final boolean
whether to assume the method handles are varargs
varArgs
,
final Class<?>[]
concrete argument types for the invocation
argTypes
,
final LinkerServices ls)

Given a list of methods handles, returns a list of maximally specific methods, applying language-runtime specific conversion preferences.

pack-priv static List<SingleDynamicMethod>

Returns:

the list of maximally specific methods.
getMaximallySpecificMethods
(final List<SingleDynamicMethod>
the list of methods
methods
,
final boolean
whether to assume the methods are varargs
varArgs
)

Given a list of methods, returns a list of maximally specific methods.

private static <T> List<T>

Returns:

the list of maximally specific methods.
getMaximallySpecificMethods
(final List<T>
the list of methods
methods
,
final boolean
whether to assume the methods are varargs
varArgs
,
final Class<?>[]
concrete argument types for the invocation
argTypes
,
final LinkerServices ls, final Function<T, MethodType> methodTypeGetter)

Given a list of methods, returns a list of maximally specific methods, applying language-runtime specific conversion preferences.

private static Class<?>
getParameterClass(final MethodType t, final int l, final int i, final boolean varArgs)

private static ConversionComparator.Comparison
isMoreSpecific(final MethodType t1, final MethodType t2, final boolean varArgs, final Class<?>[] argTypes, final LinkerServices ls)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MaximallySpecificback to summary
pack-priv MaximallySpecific()

Method Detail

compareback to summary
private static ConversionComparator.Comparison compare(final Class<?> c1, final Class<?> c2, final Class<?>[] argTypes, final int i, final LinkerServices cmp)
getMaximallySpecificMethodHandlesback to summary
pack-priv static List<MethodHandle> getMaximallySpecificMethodHandles(final List<MethodHandle> methods, final boolean varArgs, final Class<?>[] argTypes, final LinkerServices ls)

Given a list of methods handles, returns a list of maximally specific methods, applying language-runtime specific conversion preferences.

Parameters
methods:List<MethodHandle>

the list of method handles

varArgs:boolean

whether to assume the method handles are varargs

argTypes:Class<?>[]

concrete argument types for the invocation

Returns:List<MethodHandle>

the list of maximally specific method handles.

getMaximallySpecificMethodsback to summary
pack-priv static List<SingleDynamicMethod> getMaximallySpecificMethods(final List<SingleDynamicMethod> methods, final boolean varArgs)

Given a list of methods, returns a list of maximally specific methods.

Parameters
methods:List<SingleDynamicMethod>

the list of methods

varArgs:boolean

whether to assume the methods are varargs

Returns:List<SingleDynamicMethod>

the list of maximally specific methods.

getMaximallySpecificMethodsback to summary
private static <T> List<T> getMaximallySpecificMethods(final List<T> methods, final boolean varArgs, final Class<?>[] argTypes, final LinkerServices ls, final Function<T, MethodType> methodTypeGetter)

Given a list of methods, returns a list of maximally specific methods, applying language-runtime specific conversion preferences.

Parameters
methods:List<T>

the list of methods

varArgs:boolean

whether to assume the methods are varargs

argTypes:Class<?>[]

concrete argument types for the invocation

Returns:List<T>

the list of maximally specific methods.

getParameterClassback to summary
private static Class<?> getParameterClass(final MethodType t, final int l, final int i, final boolean varArgs)
isMoreSpecificback to summary
private static ConversionComparator.Comparison isMoreSpecific(final MethodType t1, final MethodType t2, final boolean varArgs, final Class<?>[] argTypes, final LinkerServices ls)