Module org.eclipse.persistence.asm
Class Method
java.lang.Object
org.eclipse.persistence.internal.libraries.asm.commons.Method
A named method descriptor.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanType[]Returns the argument types of the method described by this object.Returns the descriptor of the method described by this object.static MethodgetMethod(Constructor<?> constructor) Creates a newMethod.static MethodCreates a newMethod.static MethodReturns aMethodcorresponding to the given Java method declaration.static MethodReturns aMethodcorresponding 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.inthashCode()toString()
-
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
public int hashCode()
-