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

pack-priv Class OverloadedMethod

extends Object
Class Inheritance
Imports
java.lang.invoke.MethodHandle, .MethodHandles, .MethodType, java.util.ArrayList, .Iterator, .List, .Map, java.util.concurrent.ConcurrentHashMap, jdk.dynalink.SecureLookupSupplier, jdk.dynalink.internal.InternalTypeUtilities, jdk.dynalink.linker.LinkerServices, jdk.dynalink.linker.support.Lookup

Represents a subset of overloaded methods for a certain method name on a certain class. It can be either a fixarg or a vararg subset depending on the subclass. The method is for a fixed number of arguments though (as it is generated for a concrete call site). As such, all methods in the subset can be invoked with the specified number of arguments (exactly matching for fixargs, or having less than or equal fixed arguments, for varargs).

Field Summary

Modifier and TypeField and Description
private final Map<ClassString, MethodHandle>
private final ClassLoader
private final MethodType
private final ArrayList<MethodHandle>
private final MethodHandle
private final LinkerServices
private final SecureLookupSupplier
private final OverloadedDynamicMethod
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private final ArrayList<MethodHandle>

Constructor Summary

AccessConstructor and Description
pack-priv
OverloadedMethod(final List<MethodHandle> methodHandles, final OverloadedDynamicMethod parent, final ClassLoader callSiteClassLoader, final MethodType callSiteType, final LinkerServices linkerServices, final SecureLookupSupplier lookupSupplier)

Method Summary

Modifier and TypeMethod and Description
private MethodHandle
adaptThrower(final MethodHandle rawThrower)

private static void
private static void
appendTypes(final StringBuilder b, final Class<?>[] classes, final boolean varArg)

private static String
argTypesString(final Class<?>[] classes)

private MethodHandle
getAmbiguousMethodThrower(final Class<?>[] argTypes, final List<MethodHandle> methods)

private static Class<?>
getCommonReturnType(final List<MethodHandle> methodHandles)

pack-priv MethodHandle
private MethodHandle
getNoSuchMethodThrower(final Class<?>[] argTypes)

private static String
private MethodHandle
selectMethod(final Object[] args)

private void
throwAmbiguousMethod(final Class<?>[] argTypes, final List<MethodHandle> methods)

private void
throwNoSuchMethod(final Class<?>[] argTypes)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

argTypesToMethodsback to summary
private final Map<ClassString, MethodHandle> argTypesToMethods
callSiteClassLoaderback to summary
private final ClassLoader callSiteClassLoader
callSiteTypeback to summary
private final MethodType callSiteType
fixArgMethodsback to summary
private final ArrayList<MethodHandle> fixArgMethods
invokerback to summary
private final MethodHandle invoker
linkerServicesback to summary
private final LinkerServices linkerServices
lookupSupplierback to summary
private final SecureLookupSupplier lookupSupplier
parentback to summary
private final OverloadedDynamicMethod parent
SELECT_METHODback to summary
private static final MethodHandle SELECT_METHOD
THROW_AMBIGUOUS_METHODback to summary
private static final MethodHandle THROW_AMBIGUOUS_METHOD
THROW_NO_SUCH_METHODback to summary
private static final MethodHandle THROW_NO_SUCH_METHOD
varArgMethodsback to summary
private final ArrayList<MethodHandle> varArgMethods

Constructor Detail

OverloadedMethodback to summary
pack-priv OverloadedMethod(final List<MethodHandle> methodHandles, final OverloadedDynamicMethod parent, final ClassLoader callSiteClassLoader, final MethodType callSiteType, final LinkerServices linkerServices, final SecureLookupSupplier lookupSupplier)

Method Detail

adaptThrowerback to summary
private MethodHandle adaptThrower(final MethodHandle rawThrower)
appendSigback to summary
private static void appendSig(final StringBuilder b, final MethodHandle m)
appendTypesback to summary
private static void appendTypes(final StringBuilder b, final Class<?>[] classes, final boolean varArg)
argTypesStringback to summary
private static String argTypesString(final Class<?>[] classes)
getAmbiguousMethodThrowerback to summary
private MethodHandle getAmbiguousMethodThrower(final Class<?>[] argTypes, final List<MethodHandle> methods)
getCommonReturnTypeback to summary
private static Class<?> getCommonReturnType(final List<MethodHandle> methodHandles)
getInvokerback to summary
pack-priv MethodHandle getInvoker()
getNoSuchMethodThrowerback to summary
private MethodHandle getNoSuchMethodThrower(final Class<?>[] argTypes)
getSignatureListback to summary
private static String getSignatureList(final List<MethodHandle> methods)
selectMethodback to summary
private MethodHandle selectMethod(final Object[] args)
Annotations
@SuppressWarnings:unused
throwAmbiguousMethodback to summary
private void throwAmbiguousMethod(final Class<?>[] argTypes, final List<MethodHandle> methods) throws NoSuchMethodException
Annotations
@SuppressWarnings:unused
throwNoSuchMethodback to summary
private void throwNoSuchMethod(final Class<?>[] argTypes) throws NoSuchMethodException
Annotations
@SuppressWarnings:unused