net.sf.staccatocommons.instrument.context.internal
Class DefaultConstructorAnnotationContext

java.lang.Object
  extended by net.sf.staccatocommons.instrument.context.internal.AbstractAnnotationContext
      extended by net.sf.staccatocommons.instrument.context.internal.DefaultConstructorAnnotationContext
All Implemented Interfaces:
AnnotationContext, ConstructorAnnotationContext

public class DefaultConstructorAnnotationContext
extends AbstractAnnotationContext
implements ConstructorAnnotationContext

Author:
flbulgarelli

Constructor Summary
DefaultConstructorAnnotationContext(javassist.ClassPool pool, org.slf4j.Logger logger)
          Creates a new DefaultConstructorAnnotationContext
 
Method Summary
 javassist.CtConstructor getConstructor()
           
 javassist.CtClass getDeclaringClass()
          Answers the class were the annotated element is declared.
 javassist.CtClass getElementType()
          Returns the type of the element annotated: When the annotated element is a class, the type is that class When the annotated element is a constructor, the type is the class that declared such constructor When the annotated element is a method, the type is the return type of the method When the annotated element is an argument, the type is argument type
 boolean isPublic()
          If this annotated contextis public, that is: When the annotated element is a class, method or constructor, whether it is marked with the Java public keyword When the annotated element is an argument, whether the enclosing CtBehavior is public
 void setConstructor(javassist.CtConstructor constructor)
           
 
Methods inherited from class net.sf.staccatocommons.instrument.context.internal.AbstractAnnotationContext
getClass, getClassPool, getLogger, getPackage, getPresentAnnotationsTypes, logDebugMessage, logErrorMessage, logInfoMessage, logWarnMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.staccatocommons.instrument.context.AnnotationContext
getClass, getClassPool, getPackage, logDebugMessage, logErrorMessage, logInfoMessage, logWarnMessage
 

Constructor Detail

DefaultConstructorAnnotationContext

public DefaultConstructorAnnotationContext(@NonNull
                                           javassist.ClassPool pool,
                                           @NonNull
                                           org.slf4j.Logger logger)
Creates a new DefaultConstructorAnnotationContext

Method Detail

getConstructor

public javassist.CtConstructor getConstructor()
Specified by:
getConstructor in interface ConstructorAnnotationContext
Returns:
the constructor

getDeclaringClass

public javassist.CtClass getDeclaringClass()
Description copied from interface: AnnotationContext
Answers the class were the annotated element is declared. If the annotated element is already a top level or anonymous class, returns it.

Specified by:
getDeclaringClass in interface AnnotationContext
Returns:
the declaring class of the annotated element

setConstructor

public void setConstructor(javassist.CtConstructor constructor)
Parameters:
constructor - the constructor to set

getElementType

public javassist.CtClass getElementType()
                                 throws javassist.NotFoundException
Description copied from interface: AnnotationContext
Returns the type of the element annotated:

isPublic

public boolean isPublic()
Description copied from interface: AnnotationContext
If this annotated contextis public, that is:


Copyright © 2010-2012 Staccatocommons. All Rights Reserved.