Package io.ebean.enhance.asm.commons
Class Method
java.lang.Object
io.ebean.enhance.asm.commons.Method
public class Method extends Object
A named method descriptor.
- Author:
- Juozas Baliuka, Chris Nokleberg, Eric Bruneton
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description booleanequals(Object other)Type[]getArgumentTypes()Returns the argument types of the method described by this object.StringgetDescriptor()Returns the descriptor of the method described by this object.static MethodgetMethod(Constructor<?> constructor)Creates a newMethod.static MethodgetMethod(Method method)Creates a newMethod.static MethodgetMethod(String method)Returns aMethodcorresponding to the given Java method declaration.static MethodgetMethod(String method, boolean defaultPackage)Returns aMethodcorresponding to the given Java method declaration.StringgetName()Returns the name of the method described by this object.TypegetReturnType()Returns the return type of the method described by this object.inthashCode()StringtoString()
-
Constructor Details
-
Method Details
-
getMethod
Creates a newMethod.- Parameters:
method- a java.lang.reflect method descriptor- Returns:
- a
Methodcorresponding to the given Java method declaration.
-
getMethod
Creates a newMethod.- Parameters:
constructor- a java.lang.reflect constructor descriptor- Returns:
- a
Methodcorresponding to the given Java constructor declaration.
-
getMethod
Returns aMethodcorresponding to the given Java method declaration.- Parameters:
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.- Returns:
- a
Methodcorresponding to the given Java method declaration. - Throws:
IllegalArgumentException- ifmethodcould not get parsed.
-
getMethod
Returns aMethodcorresponding to the given Java method declaration.- Parameters:
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.- Returns:
- a
Methodcorresponding to the given Java method declaration. - Throws:
IllegalArgumentException- ifmethodcould not get parsed.
-
getName
Returns the name of the method described by this object.- Returns:
- the name of the method described by this object.
-
getDescriptor
Returns the descriptor of the method described by this object.- Returns:
- the descriptor of the method described by this object.
-
getReturnType
Returns the return type of the method described by this object.- Returns:
- the return type of the method described by this object.
-
getArgumentTypes
Returns the argument types of the method described by this object.- Returns:
- the argument types of the method described by this object.
-
toString
-
equals
-
hashCode
-