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()
Method
public java.lang.Object invoke(java.lang.Object obj, java.lang.Object... args) throws ReflectionException
Method
invoke
in interface Method
obj
- The class instanceargs
- The method argumentsReflectionException
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Method
isAnnotationPresent
in interface Method
annotation
- The annotation classpublic Annotation[] getDeclaredAnnotations()
Method
getDeclaredAnnotations
in interface Method
public Annotation getDeclaredAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Method
getDeclaredAnnotation
in interface Method
annotationType
- The annotation type to search forpublic java.lang.Class getReturnType()
Method
getReturnType
in interface Method
public java.lang.Class[] getParameterTypes()
Method
getParameterTypes
in interface Method
public java.lang.Class getDeclaringClass()
Method
getDeclaringClass
in interface Method
public boolean isAbstract()
Method
isAbstract
in interface Method
public boolean isDefaultAccess()
Method
isDefaultAccess
in interface Method
public boolean isFinal()
Method
public boolean isPrivate()
Method
public boolean isProtected()
Method
isProtected
in interface Method
public boolean isPublic()
Method
public boolean isNative()
Method
public boolean isStatic()
Method