org.spicefactory.cinnamon.config.annotation
Class AnnotationProcessor
java.lang.Object
org.spicefactory.cinnamon.config.annotation.AnnotationProcessor
public class AnnotationProcessor
- extends Object
Processes Annotations on types and methods of a single class or interface and all its super-interfaces.
Does not process superclasses. In Cinnamon this class will be used to process the @CinnamonService
and @CinnamonMethod annotations on service interfaces.
- Author:
- Jens Halm
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationProcessor
public AnnotationProcessor(Class<?> annotatedClass,
Class<? extends Annotation> classAnnotation,
Class<? extends Annotation> methodAnnotation)
- Creates a new AnnotationProcessor.
- Parameters:
annotatedClass - the annotated class that should be processedclassAnnotation - the Annotation to look for on the class declarationmethodAnnotation - the Annotation to look for on method declarations (may be the same
as classAnnotation)
getAnnotatedMethods
public Map<Method,Annotation> getAnnotatedMethods()
- Returns a Map of annotated Methods and their associated annotations. If the specified annotation is
not present on a method, that method will only be included if the class annotation is present on the class
or interface declaration. In that case the method will be mapped to the class annotation instead.
- Returns:
- a Map of Methods and their associated annotations