SingleDynamicMethod
objects that represents all overloads of a particular name (or all
constructors) for a particular class. Correctly handles overload resolution, variable arity methods, and caller
sensitive methods within the overloads.
Modifier and Type | Field and Description |
---|---|
private static final AccessControlContext | GET_CALL_SITE_CLASS_LOADER_CONTEXT
References Deprecated
AccessControlContext is deprecated or references (maybe indirectly) at least one deprecated element.
|
private final LinkedList | methods
Holds a list of all methods. |
private static final Set |
Access | Constructor and Description |
---|---|
pack-priv | OverloadedDynamicMethod(final Class<?>
the class this method belongs to clazz, final String the name of the method name)Creates a new overloaded dynamic method. |
Modifier and Type | Method and Description |
---|---|
private static void | |
public void | addMethod(final SingleDynamicMethod
a method to add method)Add a method to this overloaded method's set. |
private boolean | |
public boolean | contains(final SingleDynamicMethod
the method to check m)Implements abstract jdk. True if this dynamic method already contains a method with an identical signature as the passed in method. |
private static Set | |
private ApplicableOverloadedMethods | getApplicables(final MethodType callSiteType, final ApplicableOverloadedMethods.
|
private static ClassLoader | |
pack-priv MethodHandle | getInvocation(final CallSiteDescriptor
the descriptor of the call site callSiteDescriptor, final LinkerServices linker services. Used for language-specific type conversions. linkerServices)Implements abstract jdk. Creates an invocation for the dynamic method. |
pack-priv SingleDynamicMethod | getMethodForExactParamTypes(final String
the comma-separated list of requested parameter type names. The names will match both
qualified and unqualified type names. paramTypes)Implements abstract jdk. Returns a single dynamic method representing a single underlying Java method (possibly selected among several overloads) with formal parameter types exactly matching the passed signature. |
private static boolean | isApplicableDynamically(final LinkerServices linkerServices, final MethodType callSiteType, final SingleDynamicMethod m)
|
private static boolean | isApplicableDynamically(final LinkerServices linkerServices, final Class<?> callSiteType, final Class<?> methodType)
|
private static boolean | Returns: true if the class can be assigned from any boxed primitive. Basically, it is true if the class is any primitive wrapper class, or a superclass or superinterface of any primitive wrapper class.the class clazz)Returns true if the class can be assigned from any boxed primitive. |
public boolean | isConstructor()
Overrides jdk. True if this method happens to be a constructor method. |
private static boolean | Returns: true if callSiteType is potentially convertible to the methodType.the parameter type at the call site callSiteType, final Class<?> the parameter type in the method declaration methodType)Determines whether one type can be potentially converted to another type at runtime. |
public String | toString()
Overrides jdk. Returns a string representation of the object. |
GET_CALL_SITE_CLASS_LOADER_CONTEXT | back to summary |
---|---|
private static final AccessControlContext GET_CALL_SITE_CLASS_LOADER_CONTEXT
References Deprecated
See corresponding docs for further information.
|
methods | back to summary |
---|---|
private final LinkedList<SingleDynamicMethod> methods Holds a list of all methods. |
PRIMITIVE_WRAPPER_TYPES | back to summary |
---|---|
private static final Set<Class<?>> PRIMITIVE_WRAPPER_TYPES |
OverloadedDynamicMethod | back to summary |
---|---|
pack-priv OverloadedDynamicMethod(final Class<?> clazz, final String name) Creates a new overloaded dynamic method. |
addClassHierarchy | back to summary |
---|---|
private static void addClassHierarchy(final Map<Class<?>, Class<?>> map, final Class<?> clazz) |
addMethod | back to summary |
---|---|
public void addMethod(final SingleDynamicMethod method) Add a method to this overloaded method's set.
|
constructorFlagConsistent | back to summary |
---|---|
private boolean constructorFlagConsistent(final SingleDynamicMethod method) |
contains | back to summary |
---|---|
public boolean contains(final SingleDynamicMethod m) Implements abstract jdk. Doc from jdk. True if this dynamic method already contains a method with an identical signature as the passed in method.
|
createPrimitiveWrapperTypes | back to summary |
---|---|
private static Set |
getApplicables | back to summary |
---|---|
private ApplicableOverloadedMethods getApplicables(final MethodType callSiteType, final ApplicableOverloadedMethods. |
getCallSiteClassLoader | back to summary |
---|---|
private static ClassLoader getCallSiteClassLoader(final CallSiteDescriptor callSiteDescriptor)
|
getInvocation | back to summary |
---|---|
pack-priv MethodHandle getInvocation(final CallSiteDescriptor callSiteDescriptor, final LinkerServices linkerServices) Implements abstract jdk. Doc from jdk. Creates an invocation for the dynamic method. If the method is overloaded, it will perform overloaded method resolution based on the specified method type. The resulting resolution can either identify a single method to be invoked among the overloads, or it can identify multiple ones. In the latter case, the returned method handle will perform further overload resolution among these candidates at every invocation. If the method to be invoked is a variable arguments (vararg) method, it will pack the extra arguments in an array before the invocation of the underlying method if it is not already done.
|
getMethodForExactParamTypes | back to summary |
---|---|
pack-priv SingleDynamicMethod getMethodForExactParamTypes(final String paramTypes) Implements abstract jdk. Doc from jdk. Returns a single dynamic method representing a single underlying Java method (possibly selected among several overloads) with formal parameter types exactly matching the passed signature.
|
isApplicableDynamically | back to summary |
---|---|
private static boolean isApplicableDynamically(final LinkerServices linkerServices, final MethodType callSiteType, final SingleDynamicMethod m) |
isApplicableDynamically | back to summary |
---|---|
private static boolean isApplicableDynamically(final LinkerServices linkerServices, final Class<?> callSiteType, final Class<?> methodType) |
isAssignableFromBoxedPrimitive | back to summary |
---|---|
private static boolean isAssignableFromBoxedPrimitive(final Class<?> clazz) Returns true if the class can be assigned from any boxed primitive.
|
isConstructor | back to summary |
---|---|
public boolean isConstructor() Overrides jdk. Doc from jdk. True if this method happens to be a constructor method.
|
isPotentiallyConvertible | back to summary |
---|---|
private static boolean isPotentiallyConvertible(final Class<?> callSiteType, final Class<?> methodType) Determines whether one type can be potentially converted to another type at runtime. Allows a conversion between any subtype and supertype in either direction, and also allows a conversion between any two primitive types, as well as between any primitive type and any reference type that can hold a boxed primitive. |
toString | back to summary |
---|---|
public String toString() Overrides jdk. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- |