类 MethodSignature
java.lang.Object
cn.taketoday.bytecode.commons.MethodSignature
A named method descriptor.
A representation of a method signature, containing the method name, return type, and parameter types.
- 作者:
- Juozas Baliuka, Chris Nokleberg, Eric Bruneton, TODAY
-
字段概要
字段修饰符和类型字段说明static final MethodSignaturestatic final MethodSignaturestatic final Stringstatic final MethodSignaturestatic final MethodSignaturestatic final MethodSignaturestatic final MethodSignaturestatic final MethodSignaturestatic final MethodSignaturestatic final MethodSignaturestatic final MethodSignaturestatic final MethodSignaturestatic final MethodSignaturestatic final Stringstatic final MethodSignature -
构造器概要
构造器构造器说明MethodSignature(Type returnType, String name, Type... argumentTypes) Constructs a newMethodSignature.MethodSignature(String name, String descriptor) Constructs a newMethodSignature. -
方法概要
修饰符和类型方法说明booleanstatic MethodSignatureforConstructor(Type... parameterTypes) static MethodSignatureforConstructor(String parameterTypes) static MethodSignaturefrom(Constructor<?> constructor) Creates a newMethodSignature.static MethodSignaturestatic MethodSignatureCreates a newMethodSignature.static MethodSignatureReturns aMethodSignaturecorresponding to the given Java method declaration.static MethodSignatureReturns aMethodSignaturecorresponding to the given Java method declaration.Type[]Returns the argument types of the method described by this object.Returns the descriptor of the method described by this object.getName()Returns the name of the method described by this object.Returns the return type of the method described by this object.inthashCode()toString()
-
字段详细资料
-
构造器详细资料
-
MethodSignature
Constructs a newMethodSignature.- 参数:
name- the method's name.descriptor- the method's descriptor.
-
MethodSignature
Constructs a newMethodSignature.- 参数:
name- the method's name.returnType- the method's return type.argumentTypes- the method's argument types.- 从以下版本开始:
- 4.0
-
-
方法详细资料
-
from
Creates a newMethodSignature.- 参数:
method- a java.lang.reflect method descriptor- 返回:
- a
MethodSignaturecorresponding to the given Java method declaration.
-
from
Creates a newMethodSignature.- 参数:
constructor- a java.lang.reflect constructor descriptor- 返回:
- a
MethodSignaturecorresponding to the given Java constructor declaration.
-
from
- 从以下版本开始:
- 4.0
-
forConstructor
- 参数:
parameterTypes- a Java parameterTypes name.- 返回:
- Constructor Signature
- 从以下版本开始:
- 4.0
- 另请参阅:
-
forConstructor
- 参数:
parameterTypes- a Java parameterTypes.- 返回:
- Constructor Signature
- 从以下版本开始:
- 4.0
- 另请参阅:
-
from
Returns aMethodSignaturecorresponding 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", ...). Classes of the java.lang package can be specified by their unqualified name; all other classes names must be fully qualified.- 返回:
- a
MethodSignaturecorresponding to the given Java method declaration. - 抛出:
IllegalArgumentException- ifmethodcould not get parsed.
-
from
Returns aMethodSignaturecorresponding 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", ...). Classes of the java.lang package may be specified by their unqualified name, depending on the defaultPackage argument; all other classes names must be fully qualified.defaultPackage- true if unqualified class names belong to the default package, or false if they correspond to java.lang classes. For instance "Object" means "Object" if this option is true, or "java.lang.Object" otherwise.- 返回:
- a
MethodSignaturecorresponding to the given Java method declaration. - 抛出:
IllegalArgumentException- ifmethodcould not get parsed.
-
getName
Returns the name of the method described by this object.- 返回:
- the name of the method described by this object.
-
getDescriptor
Returns the descriptor of the method described by this object.- 返回:
- the descriptor of the method described by this object.
-
getReturnType
Returns the return type of the method described by this object.- 返回:
- the return type of the method described by this object.
-
getArgumentTypes
Returns the argument types of the method described by this object.- 返回:
- the argument types of the method described by this object.
-
toString
-
equals
-
hashCode
public int hashCode()
-