public class MethodKey
extends Object
implements Externalizable
Method, considering
the declaring class, name, and parameter types of the Method, while
ignoring its return type and exceptions. This means the compiler generated
bridging method is considered logically the same as it source counterpart. On
deserialization for a generic Method, the Method that is
resolved (bridge method or source method) is runtime environment dependent.
Whether it is resolved to a bridge method or source method is of no
consequence, as a force cast is performed on the method's return value,
assuring the same result.| Constructor and Description |
|---|
MethodKey()
The empty constructor is required by
Externalizable. |
MethodKey(Class<?> declaringClass,
String methodName,
Class<?>... parameterTypes) |
MethodKey(Method method) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
Class<?> |
getDeclaringClass() |
Method |
getMethod() |
String |
getMethodName() |
Class<?>[] |
getParameterTypes() |
int |
hashCode() |
void |
readExternal(ObjectInput objectInput) |
static void |
resetCache() |
String |
toString() |
MethodKey |
transform(ClassLoader classLoader) |
void |
writeExternal(ObjectOutput objectOutput) |
public MethodKey()
Externalizable. Do not use
this for any other purpose.public MethodKey(Class<?> declaringClass,
String methodName,
Class<?>... parameterTypes)
public MethodKey(Method method)
public static void resetCache()
public boolean equals(Object object)
equals in class Objectpublic Class<?> getDeclaringClass()
public Method getMethod()
throws NoSuchMethodException
NoSuchMethodExceptionpublic String getMethodName()
public Class<?>[] getParameterTypes()
public int hashCode()
hashCode in class Objectpublic void readExternal(ObjectInput objectInput)
throws ClassNotFoundException,
IOException
readExternal in interface ExternalizableClassNotFoundExceptionIOExceptionpublic String toString()
toString in class Objectpublic MethodKey transform(ClassLoader classLoader) throws ClassNotFoundException
ClassNotFoundExceptionpublic void writeExternal(ObjectOutput objectOutput)
throws IOException
writeExternal in interface ExternalizableIOException