org.aspectj.bridge.context
Class CompilationAndWeavingContext

java.lang.Object
  extended by org.aspectj.bridge.context.CompilationAndWeavingContext

public class CompilationAndWeavingContext
extends java.lang.Object

This class is responsible for tracking progress through the various phases of compilation and weaving. When an exception occurs (or a message is issued, if desired), you can ask this class for a "stack trace" that gives information about what the compiler was doing at the time. The trace will say something like: "when matching pointcut xyz when matching shadow sss when weaving type ABC when weaving shadow mungers"


Field Summary
static int ACCESS_FOR_INLINE
           
static int ADDING_AT_ASPECTJ_ANNOTATIONS
           
static int ADDING_DECLARE_WARNINGS_AND_ERRORS
           
static int ANALYSING_COMPILATION_UNIT
           
static int BATCH_BUILD
           
static int BUILDING_FIELDS_AND_METHODS
           
static int CHECK_AND_SET_IMPORTS
           
static int COLLECTING_ITDS_AND_DECLARES
           
static int COMPLETING_TYPE_BINDINGS
           
static int CONNECTING_TYPE_HIERARCHY
           
static int FIXING_SUPER_CALLS
           
static int FIXING_SUPER_CALLS_IN_ITDS
           
static int GENERATING_UNWOVEN_CODE_FOR_COMPILATION_UNIT
           
static int IMPLEMENTING_ON_SHADOW
           
static int INCREMENTAL_BUILD
           
static int MATCHING_POINTCUT
           
static int MATCHING_SHADOW
           
static int MUNGING_WITH
           
static int OPTIMIZING_THIS_JOIN_POINT_CALLS
           
static java.lang.String[] PHASE_NAMES
           
static int PROCESSING_ATASPECTJTYPE_MUNGERS_ONLY
           
static int PROCESSING_COMPILATION_UNIT
           
static int PROCESSING_DECLARE_ANNOTATIONS
           
static int PROCESSING_DECLARE_PARENTS
           
static int PROCESSING_REWEAVABLE_STATE
           
static int PROCESSING_TYPE_MUNGERS
           
static int RESOLVING_COMPILATION_UNIT
           
static int RESOLVING_POINTCUT_DECLARATIONS
           
static int VALIDATING_AT_ASPECTJ_ANNOTATIONS
           
static int WEAVING
           
static int WEAVING_ASPECTS
           
static int WEAVING_CLASSES
           
static int WEAVING_INTERTYPE_DECLARATIONS
           
static int WEAVING_TYPE
           
 
Method Summary
static ContextToken enteringPhase(int phaseId, java.lang.Object data)
           
static java.lang.String getCurrentContext()
          Returns a string description of what the compiler/weaver is currently doing
static void leavingPhase(ContextToken aToken)
          Exit a phase, all stack entries from the one with the given token down will be removed.
static void registerFormatter(int phaseId, ContextFormatter aFormatter)
           
static void reset()
           
static void resetForThread()
          Forget about the context for the current thread
static void setMultiThreaded(boolean mt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BATCH_BUILD

public static final int BATCH_BUILD
See Also:
Constant Field Values

INCREMENTAL_BUILD

public static final int INCREMENTAL_BUILD
See Also:
Constant Field Values

PROCESSING_COMPILATION_UNIT

public static final int PROCESSING_COMPILATION_UNIT
See Also:
Constant Field Values

RESOLVING_COMPILATION_UNIT

public static final int RESOLVING_COMPILATION_UNIT
See Also:
Constant Field Values

ANALYSING_COMPILATION_UNIT

public static final int ANALYSING_COMPILATION_UNIT
See Also:
Constant Field Values

GENERATING_UNWOVEN_CODE_FOR_COMPILATION_UNIT

public static final int GENERATING_UNWOVEN_CODE_FOR_COMPILATION_UNIT
See Also:
Constant Field Values

COMPLETING_TYPE_BINDINGS

public static final int COMPLETING_TYPE_BINDINGS
See Also:
Constant Field Values

PROCESSING_DECLARE_PARENTS

public static final int PROCESSING_DECLARE_PARENTS
See Also:
Constant Field Values

CHECK_AND_SET_IMPORTS

public static final int CHECK_AND_SET_IMPORTS
See Also:
Constant Field Values

CONNECTING_TYPE_HIERARCHY

public static final int CONNECTING_TYPE_HIERARCHY
See Also:
Constant Field Values

BUILDING_FIELDS_AND_METHODS

public static final int BUILDING_FIELDS_AND_METHODS
See Also:
Constant Field Values

COLLECTING_ITDS_AND_DECLARES

public static final int COLLECTING_ITDS_AND_DECLARES
See Also:
Constant Field Values

PROCESSING_DECLARE_ANNOTATIONS

public static final int PROCESSING_DECLARE_ANNOTATIONS
See Also:
Constant Field Values

WEAVING_INTERTYPE_DECLARATIONS

public static final int WEAVING_INTERTYPE_DECLARATIONS
See Also:
Constant Field Values

RESOLVING_POINTCUT_DECLARATIONS

public static final int RESOLVING_POINTCUT_DECLARATIONS
See Also:
Constant Field Values

ADDING_DECLARE_WARNINGS_AND_ERRORS

public static final int ADDING_DECLARE_WARNINGS_AND_ERRORS
See Also:
Constant Field Values

VALIDATING_AT_ASPECTJ_ANNOTATIONS

public static final int VALIDATING_AT_ASPECTJ_ANNOTATIONS
See Also:
Constant Field Values

ACCESS_FOR_INLINE

public static final int ACCESS_FOR_INLINE
See Also:
Constant Field Values

ADDING_AT_ASPECTJ_ANNOTATIONS

public static final int ADDING_AT_ASPECTJ_ANNOTATIONS
See Also:
Constant Field Values

FIXING_SUPER_CALLS_IN_ITDS

public static final int FIXING_SUPER_CALLS_IN_ITDS
See Also:
Constant Field Values

FIXING_SUPER_CALLS

public static final int FIXING_SUPER_CALLS
See Also:
Constant Field Values

OPTIMIZING_THIS_JOIN_POINT_CALLS

public static final int OPTIMIZING_THIS_JOIN_POINT_CALLS
See Also:
Constant Field Values

WEAVING

public static final int WEAVING
See Also:
Constant Field Values

PROCESSING_REWEAVABLE_STATE

public static final int PROCESSING_REWEAVABLE_STATE
See Also:
Constant Field Values

PROCESSING_TYPE_MUNGERS

public static final int PROCESSING_TYPE_MUNGERS
See Also:
Constant Field Values

WEAVING_ASPECTS

public static final int WEAVING_ASPECTS
See Also:
Constant Field Values

WEAVING_CLASSES

public static final int WEAVING_CLASSES
See Also:
Constant Field Values

WEAVING_TYPE

public static final int WEAVING_TYPE
See Also:
Constant Field Values

MATCHING_SHADOW

public static final int MATCHING_SHADOW
See Also:
Constant Field Values

IMPLEMENTING_ON_SHADOW

public static final int IMPLEMENTING_ON_SHADOW
See Also:
Constant Field Values

MATCHING_POINTCUT

public static final int MATCHING_POINTCUT
See Also:
Constant Field Values

MUNGING_WITH

public static final int MUNGING_WITH
See Also:
Constant Field Values

PROCESSING_ATASPECTJTYPE_MUNGERS_ONLY

public static final int PROCESSING_ATASPECTJTYPE_MUNGERS_ONLY
See Also:
Constant Field Values

PHASE_NAMES

public static final java.lang.String[] PHASE_NAMES
Method Detail

reset

public static void reset()

setMultiThreaded

public static void setMultiThreaded(boolean mt)

registerFormatter

public static void registerFormatter(int phaseId,
                                     ContextFormatter aFormatter)

getCurrentContext

public static java.lang.String getCurrentContext()
Returns a string description of what the compiler/weaver is currently doing


enteringPhase

public static ContextToken enteringPhase(int phaseId,
                                         java.lang.Object data)

leavingPhase

public static void leavingPhase(ContextToken aToken)
Exit a phase, all stack entries from the one with the given token down will be removed.


resetForThread

public static void resetForThread()
Forget about the context for the current thread