public class Method
extends java.lang.Object
Constructor and Description |
---|
Method(java.lang.String name,
java.lang.String desc)
Creates a new
Method . |
Method(java.lang.String name,
Type returnType,
Type[] argumentTypes)
Creates a new
Method . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
Type[] |
getArgumentTypes()
Returns the argument types of the method described by this object.
|
java.lang.String |
getDescriptor()
Returns the descriptor of the method described by this object.
|
static Method |
getMethod(java.lang.String method)
Returns a
Method corresponding to the given Java method
declaration. |
java.lang.String |
getName()
Returns the name of the method described by this object.
|
Type |
getReturnType()
Returns the return type of the method described by this object.
|
int |
hashCode() |
java.lang.String |
toString() |
public Method(java.lang.String name, java.lang.String desc)
Method
.name
- the method's name.desc
- the method's descriptor.public static Method getMethod(java.lang.String method) throws java.lang.IllegalArgumentException
Method
corresponding to the given Java method
declaration.method
- a Java method declaration, without argument names, of the
form "returnType name (argumentType1, ... argumentTypeN)", where
the types are in plain Java (e.g. "int", "float",
"java.util.List", ...).Method
corresponding to the given Java method
declaration.java.lang.IllegalArgumentException
- if method
could not get
parsed.public java.lang.String getName()
public java.lang.String getDescriptor()
public Type getReturnType()
public Type[] getArgumentTypes()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object