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 Newton (6.2.x), 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(Class<?> declaringClass, String methodName, Class<?>... parameterTypes)
public MethodKey(Method method)
@Deprecated public MethodKey(String declaringClassName, String methodName, Class<?>... parameterTypes)
MethodKey(Class,
String, Class...)
public boolean equals(Object obj)
equals
in class Object
public Class<?> getDeclaringClass()
public Method getMethod() throws NoSuchMethodException
NoSuchMethodException
public String getMethodName()
public Class<?>[] getParameterTypes()
public int hashCode()
hashCode
in class Object
public void readExternal(ObjectInput objectInput) throws ClassNotFoundException, IOException
readExternal
in interface Externalizable
ClassNotFoundException
IOException
public String toString()
toString
in class Object
public MethodKey transform(ClassLoader classLoader) throws ClassNotFoundException
ClassNotFoundException
public void writeExternal(ObjectOutput objectOutput) throws IOException
writeExternal
in interface Externalizable
IOException