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