public class MethodKey
extends java.lang.Object
implements java.io.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(java.lang.Class<?> declaringClass,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes) |
MethodKey(java.lang.reflect.Method method) |
MethodKey(java.lang.String declaringClassName,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes)
Deprecated.
As of 6.2.0, replaced by
MethodKey(Class, String,
Class...) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Class<?> |
getDeclaringClass() |
java.lang.reflect.Method |
getMethod() |
java.lang.String |
getMethodName() |
java.lang.Class<?>[] |
getParameterTypes() |
int |
hashCode() |
void |
readExternal(java.io.ObjectInput objectInput) |
java.lang.String |
toString() |
MethodKey |
transform(java.lang.ClassLoader classLoader) |
void |
writeExternal(java.io.ObjectOutput objectOutput) |
public MethodKey()
Externalizable. Do not use
this for any other purpose.public MethodKey(java.lang.Class<?> declaringClass,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes)
public MethodKey(java.lang.reflect.Method method)
@Deprecated
public MethodKey(java.lang.String declaringClassName,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes)
MethodKey(Class, String,
Class...)public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.Class<?> getDeclaringClass()
public java.lang.reflect.Method getMethod()
throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodExceptionpublic java.lang.String getMethodName()
public java.lang.Class<?>[] getParameterTypes()
public int hashCode()
hashCode in class java.lang.Objectpublic void readExternal(java.io.ObjectInput objectInput)
throws java.lang.ClassNotFoundException,
java.io.IOException
readExternal in interface java.io.Externalizablejava.lang.ClassNotFoundExceptionjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic MethodKey transform(java.lang.ClassLoader classLoader) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionpublic void writeExternal(java.io.ObjectOutput objectOutput)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException