public final class MethodDescriptor extends Object
The format is simply "(ParamTypes...)ReturnType", for example
given a method with two integer parameters and a String return
type - the descriptor would be "(II)Ljava/lang/String;".
| Constructor and Description |
|---|
MethodDescriptor(List<FieldType> paramTypes,
Type returnType)
Creates a descriptor from the given param types, and return type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
List<FieldType> |
getParamTypes()
Gets an immutable-view of the parameter
Types of the
method. |
Type |
getReturnType()
Gets the return
Type of the method. |
int |
hashCode() |
static MethodDescriptor |
of(Method method)
Creates a
MethodDescriptor for the given method. |
static MethodDescriptor |
of(String descriptor)
Compiles a
MethodDescriptor for the given raw descriptor. |
String |
toString() |
public static MethodDescriptor of(String descriptor)
MethodDescriptor for the given raw descriptor.descriptor - The raw method descriptorpublic static MethodDescriptor of(Method method)
MethodDescriptor for the given method.method - The methodpublic List<FieldType> getParamTypes()
Types of the
method.public Type getReturnType()
Type of the method.