Class Shadow

java.lang.Object
org.aspectj.weaver.Shadow
Direct Known Subclasses:
BcelShadow, ReflectionShadow, StandardShadow

public abstract class Shadow extends Object
  • Field Details

    • enclosingShadow

      protected final Shadow enclosingShadow
    • mungers

      protected List<ShadowMunger> mungers
    • needAroundClosureStacking

      protected boolean needAroundClosureStacking
    • shadowId

      public int shadowId
    • METHOD_EXECUTION

      public static String METHOD_EXECUTION
    • METHOD_CALL

      public static String METHOD_CALL
    • CONSTRUCTOR_EXECUTION

      public static String CONSTRUCTOR_EXECUTION
    • CONSTRUCTOR_CALL

      public static String CONSTRUCTOR_CALL
    • FIELD_GET

      public static String FIELD_GET
    • FIELD_SET

      public static String FIELD_SET
    • STATICINITIALIZATION

      public static String STATICINITIALIZATION
    • PREINITIALIZATION

      public static String PREINITIALIZATION
    • INITIALIZATION

      public static String INITIALIZATION
    • EXCEPTION_HANDLER

      public static String EXCEPTION_HANDLER
    • SYNCHRONIZATION_LOCK

      public static String SYNCHRONIZATION_LOCK
    • SYNCHRONIZATION_UNLOCK

      public static String SYNCHRONIZATION_UNLOCK
    • ADVICE_EXECUTION

      public static String ADVICE_EXECUTION
    • MethodCall

      public static final Shadow.Kind MethodCall
      These names are the ones that will be returned by thisJoinPoint.getKind() Those need to be documented somewhere
    • ConstructorCall

      public static final Shadow.Kind ConstructorCall
    • MethodExecution

      public static final Shadow.Kind MethodExecution
    • ConstructorExecution

      public static final Shadow.Kind ConstructorExecution
    • FieldGet

      public static final Shadow.Kind FieldGet
    • FieldSet

      public static final Shadow.Kind FieldSet
    • StaticInitialization

      public static final Shadow.Kind StaticInitialization
    • PreInitialization

      public static final Shadow.Kind PreInitialization
    • AdviceExecution

      public static final Shadow.Kind AdviceExecution
    • Initialization

      public static final Shadow.Kind Initialization
    • ExceptionHandler

      public static final Shadow.Kind ExceptionHandler
    • SynchronizationLock

      public static final Shadow.Kind SynchronizationLock
    • SynchronizationUnlock

      public static final Shadow.Kind SynchronizationUnlock
    • MethodCallBit

      public static final int MethodCallBit
      See Also:
      Constant Field Values
    • ConstructorCallBit

      public static final int ConstructorCallBit
      See Also:
      Constant Field Values
    • MethodExecutionBit

      public static final int MethodExecutionBit
      See Also:
      Constant Field Values
    • ConstructorExecutionBit

      public static final int ConstructorExecutionBit
      See Also:
      Constant Field Values
    • FieldGetBit

      public static final int FieldGetBit
      See Also:
      Constant Field Values
    • FieldSetBit

      public static final int FieldSetBit
      See Also:
      Constant Field Values
    • StaticInitializationBit

      public static final int StaticInitializationBit
      See Also:
      Constant Field Values
    • PreInitializationBit

      public static final int PreInitializationBit
      See Also:
      Constant Field Values
    • AdviceExecutionBit

      public static final int AdviceExecutionBit
      See Also:
      Constant Field Values
    • InitializationBit

      public static final int InitializationBit
      See Also:
      Constant Field Values
    • ExceptionHandlerBit

      public static final int ExceptionHandlerBit
      See Also:
      Constant Field Values
    • SynchronizationLockBit

      public static final int SynchronizationLockBit
      See Also:
      Constant Field Values
    • SynchronizationUnlockBit

      public static final int SynchronizationUnlockBit
      See Also:
      Constant Field Values
    • MAX_SHADOW_KIND

      public static final int MAX_SHADOW_KIND
      See Also:
      Constant Field Values
    • SHADOW_KINDS

      public static final Shadow.Kind[] SHADOW_KINDS
    • ALL_SHADOW_KINDS_BITS

      public static final int ALL_SHADOW_KINDS_BITS
    • NO_SHADOW_KINDS_BITS

      public static final int NO_SHADOW_KINDS_BITS
  • Constructor Details

  • Method Details

    • getIWorld

      public abstract World getIWorld()
    • getMungers

      public List<ShadowMunger> getMungers()
    • hasThis

      public final boolean hasThis()
      could this(*) pcd ever match
    • getThisType

      public final UnresolvedType getThisType()
      the type of the this object here
      Throws:
      IllegalStateException - if there is no this here
    • getThisVar

      public abstract Var getThisVar()
      a var referencing this
      Throws:
      IllegalStateException - if there is no target here
    • hasTarget

      public final boolean hasTarget()
      could target(*) pcd ever match
    • getTargetType

      public final UnresolvedType getTargetType()
      the type of the target object here
      Throws:
      IllegalStateException - if there is no target here
    • getTargetVar

      public abstract Var getTargetVar()
      a var referencing the target
      Throws:
      IllegalStateException - if there is no target here
    • getArgTypes

      public UnresolvedType[] getArgTypes()
    • isShadowForArrayConstructionJoinpoint

      public boolean isShadowForArrayConstructionJoinpoint()
    • isShadowForMonitor

      public boolean isShadowForMonitor()
    • getArgumentTypesForArrayConstructionShadow

      public ResolvedType[] getArgumentTypesForArrayConstructionShadow()
    • getGenericArgTypes

      public UnresolvedType[] getGenericArgTypes()
    • getArgType

      public UnresolvedType getArgType(int arg)
    • getArgCount

      public int getArgCount()
    • getEnclosingType

      public abstract UnresolvedType getEnclosingType()
    • getArgVar

      public abstract Var getArgVar(int i)
    • getThisJoinPointVar

      public abstract Var getThisJoinPointVar()
    • getThisJoinPointStaticPartVar

      public abstract Var getThisJoinPointStaticPartVar()
    • getThisEnclosingJoinPointStaticPartVar

      public abstract Var getThisEnclosingJoinPointStaticPartVar()
    • getThisAspectInstanceVar

      public abstract Var getThisAspectInstanceVar(ResolvedType aspectType)
    • getKindedAnnotationVar

      public abstract Var getKindedAnnotationVar(UnresolvedType forAnnotationType)
    • getWithinAnnotationVar

      public abstract Var getWithinAnnotationVar(UnresolvedType forAnnotationType)
    • getWithinCodeAnnotationVar

      public abstract Var getWithinCodeAnnotationVar(UnresolvedType forAnnotationType)
    • getThisAnnotationVar

      public abstract Var getThisAnnotationVar(UnresolvedType forAnnotationType)
    • getTargetAnnotationVar

      public abstract Var getTargetAnnotationVar(UnresolvedType forAnnotationType)
    • getArgAnnotationVar

      public abstract Var getArgAnnotationVar(int i, UnresolvedType forAnnotationType)
    • getEnclosingCodeSignature

      public abstract Member getEnclosingCodeSignature()
    • getKind

      public Shadow.Kind getKind()
      returns the kind of shadow this is, representing what happens under this shadow
    • getSignature

      public Member getSignature()
      returns the signature of the thing under this shadow
    • getMatchingSignature

      public Member getMatchingSignature()
      returns the signature of the thing under this shadow, with any synthetic arguments removed
    • setMatchingSignature

      public void setMatchingSignature(Member member)
    • getResolvedSignature

      public ResolvedMember getResolvedSignature()
      returns the resolved signature of the thing under this shadow
    • getReturnType

      public UnresolvedType getReturnType()
    • howMany

      public static int howMany(int i)
      Return count of how many bits set in the supplied parameter.
    • checkMunger

      protected boolean checkMunger(ShadowMunger munger)
      Only does the check if the munger requires it (@AJ aspects don't)
      Parameters:
      munger -
      Returns:
    • checkCanThrow

      protected boolean checkCanThrow(ShadowMunger munger, ResolvedType resolvedTypeX)
    • addMunger

      public void addMunger(ShadowMunger munger)
    • implement

      public final void implement()
    • prepareForMungers

      protected void prepareForMungers()
      Prepare the shadow for implementation. After this is done, the shadow should be in such a position that each munger simply needs to be implemented.
    • getSourceLocation

      public abstract ISourceLocation getSourceLocation()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toResolvedString

      public String toResolvedString(World world)
    • toSet

      public static Set<Shadow.Kind> toSet(int i)
      Convert a bit array for the shadow kinds into a set of them... should only be used for testing - mainline code should do bit manipulation!