public class MethodSignature extends MemberSignature
name| Constructor and Description |
|---|
MethodSignature(String name,
MethodDescriptor descriptor)
Creates a method signature, with the given name and
MethodDescriptor. |
| Modifier and Type | Method and Description |
|---|---|
protected StringJoiner |
buildToString() |
boolean |
equals(Object obj) |
MethodDescriptor |
getDescriptor()
Gets the descriptor of the method.
|
int |
hashCode() |
static MethodSignature |
of(Method method)
Creates a
MethodSignature for the given method. |
static MethodSignature |
of(String nameAndDescriptor)
Creates a method signature, with the given raw string that contains the
method name and descriptor concatenated.
|
static MethodSignature |
of(String name,
String descriptor)
Creates a method signature, with the given method name and raw descriptor.
|
String |
toJvmsIdentifier()
Returns a JVMS-like identifier corresponding to this signature.
|
getName, toStringpublic MethodSignature(String name, MethodDescriptor descriptor)
MethodDescriptor.name - The method namedescriptor - The method descriptorpublic static MethodSignature of(String name, String descriptor)
name - The method namedescriptor - The method's raw descriptorpublic static MethodSignature of(String nameAndDescriptor)
nameAndDescriptor - The method name and descriptorpublic static MethodSignature of(Method method)
MethodSignature for the given method.method - The methodpublic MethodDescriptor getDescriptor()
public String toJvmsIdentifier()
MemberSignature
For field signatures, this will take the form
name(descriptor).
For method signatures, this will take the form
name(params)ret_type - in other terms, the name directly
concatenated with the JVMS descriptor.
toJvmsIdentifier in class MemberSignatureprotected StringJoiner buildToString()
buildToString in class MemberSignature