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 Newton (6.2.x), 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.Object
public java.lang.Class<?> getDeclaringClass()
public java.lang.reflect.Method getMethod() throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException
public java.lang.String getMethodName()
public java.lang.Class<?>[] getParameterTypes()
public int hashCode()
hashCode
in class java.lang.Object
public void readExternal(java.io.ObjectInput objectInput) throws java.lang.ClassNotFoundException, java.io.IOException
readExternal
in interface java.io.Externalizable
java.lang.ClassNotFoundException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public MethodKey transform(java.lang.ClassLoader classLoader) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput objectOutput) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException