|
Invocation API 1.1.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.invocation.proxy.MethodIdentifier
public final class MethodIdentifier
A unique identification of a method within some class or interface which is class loader-agnostic. Suitable for serialization as well as usage as a hash table key.
| Field Summary | |
|---|---|
static MethodIdentifier |
EQUALS
The method identifier for Object.equals(). |
static MethodIdentifier |
FINALIZE
The method identifier for Object.finalize(). |
static MethodIdentifier |
HASH_CODE
The method identifier for Object.hashCode(). |
static MethodIdentifier |
TO_STRING
The method identifier for Object.toString(). |
| Method Summary | |
|---|---|
boolean |
equals(MethodIdentifier other)
Determine whether this object is equal to another. |
boolean |
equals(Object other)
Determine whether this object is equal to another. |
static MethodIdentifier |
getIdentifier(Class<?> returnType,
String name,
Class<?>... parameterTypes)
Construct a new instance using class objects for the parameter types. |
static MethodIdentifier |
getIdentifier(String returnType,
String name,
String... parameterTypes)
Construct a new instance using string names for the return and parameter types. |
static MethodIdentifier |
getIdentifierForMethod(Method method)
Get an identifier for the given reflection method. |
String |
getName()
Get the method name. |
String[] |
getParameterTypes()
Get the parameter type names, as strings. |
Method |
getPublicMethod(Class<?> clazz)
Look up a public method matching this method identifier using reflection. |
String |
getReturnType()
Get the method return type name, as a string. |
int |
hashCode()
Get the hash code for this method identifier. |
String |
toString()
Get the human-readable representation of this identifier. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final MethodIdentifier EQUALS
Object.equals().
public static final MethodIdentifier HASH_CODE
Object.hashCode().
public static final MethodIdentifier TO_STRING
Object.toString().
public static final MethodIdentifier FINALIZE
Object.finalize().
| Method Detail |
|---|
public String getName()
public String[] getParameterTypes()
public String getReturnType()
public boolean equals(Object other)
equals in class Objectother - the other object
true if they are equal, false otherwisepublic boolean equals(MethodIdentifier other)
other - the other object
true if they are equal, false otherwisepublic int hashCode()
n * 7 + (r * 7 + a)
where n is the method name's hash code, r is the method return type's name's hash code
and a is the result of calling Arrays.hashCode(Object[]) on the parameter type name list (of
strings).
hashCode in class Object
public Method getPublicMethod(Class<?> clazz)
throws NoSuchMethodException,
ClassNotFoundException
clazz - the class to search
NoSuchMethodException - if no such method exists
ClassNotFoundException - if one of the classes referenced by this identifier are not found in clazz's
class loaderpublic String toString()
toString in class Objectpublic static MethodIdentifier getIdentifierForMethod(Method method)
method - the method
public static MethodIdentifier getIdentifier(Class<?> returnType,
String name,
Class<?>... parameterTypes)
returnType - the method return typename - the method nameparameterTypes - the method parameter types
public static MethodIdentifier getIdentifier(String returnType,
String name,
String... parameterTypes)
returnType - the return type namename - the method nameparameterTypes - the method parameter type names
|
Invocation API 1.1.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||