Module org.eclipse.persistence.asm
Class Method
java.lang.Object
org.eclipse.persistence.internal.libraries.asm.commons.Method
A named method descriptor.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Type[]
Returns the argument types of the method described by this object.Returns the descriptor of the method described by this object.static Method
getMethod
(Constructor<?> constructor) Creates a newMethod
.static Method
Creates a newMethod
.static Method
Returns aMethod
corresponding to the given Java method declaration.static Method
Returns aMethod
corresponding to the given Java method declaration.getName()
Returns the name of the method described by this object.Returns the return type of the method described by this object.int
hashCode()
toString()
-
Constructor Details
-
Method Details
-
getMethod
Creates a newMethod
.- Parameters:
method
- a java.lang.reflect method descriptor- Returns:
- a
Method
corresponding to the given Java method declaration.
-
getMethod
Creates a newMethod
.- Parameters:
constructor
- a java.lang.reflect constructor descriptor- Returns:
- a
Method
corresponding to the given Java constructor declaration.
-
getMethod
Returns aMethod
corresponding 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
Method
corresponding to the given Java method declaration. - Throws:
IllegalArgumentException
- ifmethod
could not get parsed.
-
getMethod
Returns aMethod
corresponding 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
Method
corresponding to the given Java method declaration. - Throws:
IllegalArgumentException
- ifmethod
could 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
public int hashCode()
-