Package org.smooks.annotation
Interface AnnotatedClass
-
public interface AnnotatedClass
The annotated class is a class or interface inheriting all annotations of a superclass and base interfaces. The annotation is inherited if there no ambiguity arises: if the annotation is not met several times in the superclass and base interfaces.Note: This class is a modified version of the original Fusionsoft Annotation library. See: http://www.fusionsoft-online.com/articles-java-annotations.php
- Version:
- 1.0
- Author:
- Vladimir Ovchinnikov, maurice.zeijen@smies.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Annotation[]
getAllAnnotations()
AnnotatedMethod
getAnnotatedMethod(Method method)
AnnotatedMethod
getAnnotatedMethod(String name, Class<?>[] parameterType)
AnnotatedMethod[]
getAnnotatedMethods()
<T extends Annotation>
TgetAnnotation(Class<T> annotationClass)
Class<?>
getTheClass()
boolean
isAnnotationPresent(Class<? extends Annotation> annotationClass)
Returns true if an annotation for the specified type is present on this element, else false.
-
-
-
Method Detail
-
getTheClass
Class<?> getTheClass()
- Returns:
- the class which inherited annotations are calculated.
-
isAnnotationPresent
boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
Returns true if an annotation for the specified type is present on this element, else false.- Parameters:
annotationClass
- the Class object corresponding to the annotation type- Returns:
- true if an annotation for the specified annotation type is present on this element, else false
-
getAllAnnotations
Annotation[] getAllAnnotations()
- Returns:
- all the inherited or declared annotations.
-
getAnnotation
<T extends Annotation> T getAnnotation(Class<T> annotationClass)
- Parameters:
annotationClass
- to find an annotation.- Returns:
- the inherited or declared annotation of the specified class.
-
getAnnotatedMethods
AnnotatedMethod[] getAnnotatedMethods()
- Returns:
- all the annotated methods of the class (empty if none).
-
getAnnotatedMethod
AnnotatedMethod getAnnotatedMethod(String name, Class<?>[] parameterType)
- Parameters:
name
- of the method to find.parameterType
- of the method to find.- Returns:
- the public method having the specified name and signature (null if the method is not declared in the class).
-
getAnnotatedMethod
AnnotatedMethod getAnnotatedMethod(Method method)
- Parameters:
public
- method of the annotated class.- Returns:
- the annotation wrapping for the method (null if the method is not declared in the class)
-
-