| Constructor and Description |
|---|
JvmMethod(java.lang.reflect.Method method) |
| Modifier and Type | Method and Description |
|---|---|
Annotation |
getDeclaredAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns a annotation on this method
|
Annotation[] |
getDeclaredAnnotations()
Returns the declared annotations
|
java.lang.Class |
getDeclaringClass()
Returns the Class object representing the class or interface that declares the method.
|
java.lang.String |
getName()
Returns the name of the method
|
java.lang.Class[] |
getParameterTypes()
Returns the type of the parameters in declared order
|
java.lang.Class |
getReturnType()
Returns the return type of the method
|
java.lang.Object |
invoke(java.lang.Object obj,
java.lang.Object... args)
Invokes the method for a given class instance
|
boolean |
isAbstract()
Returns true if the method is declared as abstract
|
boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Returns true if the method if annotated with the given annotation class
|
boolean |
isDefaultAccess()
Returns true if the method is not public, private or protected
|
boolean |
isFinal()
Returns true if the method is declared as final
|
boolean |
isNative()
Returns true if the method is declared as native
|
boolean |
isPrivate()
Returns true if the method is declared as private
|
boolean |
isProtected()
Returns true if the method is declared as protected
|
boolean |
isPublic()
Returns true if the method is declared as public
|
boolean |
isStatic()
Returns true if the method is declared as static
|
boolean |
isVarArgs()
Returns true if the method takes a variable number of parameters (...)
|
public java.lang.String getName()
Methodpublic java.lang.Object invoke(java.lang.Object obj,
java.lang.Object... args)
throws ReflectionException
Methodinvoke in interface Methodobj - The class instanceargs - The method argumentsReflectionExceptionpublic boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
MethodisAnnotationPresent in interface Methodannotation - The annotation classpublic Annotation[] getDeclaredAnnotations()
MethodgetDeclaredAnnotations in interface Methodpublic Annotation getDeclaredAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
MethodgetDeclaredAnnotation in interface MethodannotationType - The annotation type to search forpublic java.lang.Class getReturnType()
MethodgetReturnType in interface Methodpublic java.lang.Class[] getParameterTypes()
MethodgetParameterTypes in interface Methodpublic java.lang.Class getDeclaringClass()
MethodgetDeclaringClass in interface Methodpublic boolean isAbstract()
MethodisAbstract in interface Methodpublic boolean isDefaultAccess()
MethodisDefaultAccess in interface Methodpublic boolean isFinal()
Methodpublic boolean isPrivate()
Methodpublic boolean isProtected()
MethodisProtected in interface Methodpublic boolean isPublic()
Methodpublic boolean isNative()
Methodpublic boolean isStatic()
Method