net.sf.staccatocommons.instrument.handler
Interface ClassAnnotationHandler<A extends Annotation>

Type Parameters:
A - the annotation type to handle
All Superinterfaces:
AnnotationHandler<A>

public interface ClassAnnotationHandler<A extends Annotation>
extends AnnotationHandler<A>

Interface for annotation handlers that can process annotations in methods.

Author:
flbulgarelli

Method Summary
 void postProcessAnnotatedClass(A annotation, ClassAnnotationContext context)
          Process an annotation discovered in a clazz by the instrumenter, instrumenting the given context where the annotation was found.
 void preProcessAnnotatedClass(A annotation, ClassAnnotationContext context)
          Process an annotation discovered in a clazz by the instrumenter, instrumenting the given context where the annotation was found.
 
Methods inherited from interface net.sf.staccatocommons.instrument.handler.AnnotationHandler
getSupportedAnnotationType
 

Method Detail

preProcessAnnotatedClass

void preProcessAnnotatedClass(@NonNull
                              A annotation,
                              @NonNull
                              ClassAnnotationContext context)
                              throws javassist.CannotCompileException,
                                     javassist.NotFoundException
Process an annotation discovered in a clazz by the instrumenter, instrumenting the given context where the annotation was found. This message is sent by the instrumenter before discovering any method or constructor annotation.

Parameters:
annotation - the annotation to process
context - the instrumentable context where the annotation was found
Throws:
javassist.CannotCompileException - if compilation errors occur during instrumentation
javassist.NotFoundException - if any type needed by instrumentation was not found

postProcessAnnotatedClass

void postProcessAnnotatedClass(@NonNull
                               A annotation,
                               @NonNull
                               ClassAnnotationContext context)
                               throws javassist.CannotCompileException,
                                      javassist.NotFoundException
Process an annotation discovered in a clazz by the instrumenter, instrumenting the given context where the annotation was found. This message is sent by the instrumenter after discovering all methods and constructors annotations.

Parameters:
annotation - the annotation to process
context - the instrumentable context where the annotation was found
Throws:
javassist.CannotCompileException - if compilation errors occur during instrumentation
javassist.NotFoundException - if any type needed by instrumentation was not found


Copyright © 2010-2012 StaccatoCommons. All Rights Reserved.