public class Method extends Object
Type
.Constructor and Description |
---|
Method(String name,
Class enclosingType,
Class returnType,
Parameter[] parameters,
boolean isAbstract,
boolean isFinal,
boolean isStatic,
boolean isDefaultAccess,
boolean isPrivate,
boolean isProtected,
boolean isPublic,
boolean isNative,
boolean isVarArgs,
boolean isMethod,
boolean isConstructor,
int methodId,
Annotation[] annotations) |
Modifier and Type | Method and Description |
---|---|
Annotation[] |
getDeclaredAnnotations() |
Class |
getEnclosingType() |
String |
getName() |
Parameter[] |
getParameters() |
Class |
getReturnType() |
Object |
invoke(Object obj,
Object... params)
Invokes the method on the given object.
|
boolean |
isAbstract() |
boolean |
isConstructor() |
boolean |
isDefaultAccess() |
boolean |
isFinal() |
boolean |
isMethod() |
boolean |
isNative() |
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isPublic() |
boolean |
isStatic() |
boolean |
isVarArgs() |
String |
toString() |
public Method(String name, Class enclosingType, Class returnType, Parameter[] parameters, boolean isAbstract, boolean isFinal, boolean isStatic, boolean isDefaultAccess, boolean isPrivate, boolean isProtected, boolean isPublic, boolean isNative, boolean isVarArgs, boolean isMethod, boolean isConstructor, int methodId, Annotation[] annotations)
public Parameter[] getParameters()
public String getName()
public boolean isAbstract()
public boolean isFinal()
public boolean isDefaultAccess()
public boolean isPrivate()
public boolean isProtected()
public boolean isPublic()
public boolean isNative()
public boolean isVarArgs()
public boolean isStatic()
public boolean isMethod()
public boolean isConstructor()
public Annotation[] getDeclaredAnnotations()
public Object invoke(Object obj, Object... params)
obj
- the object to invoke the method on or null.params
- the parameters to pass to the method or null.Copyright © 2017. All rights reserved.