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