Package org.aspectj.bridge.context

Examples of org.aspectj.bridge.context.ContextToken


        if (resolvedSuperInterface.isExposedToWeaver()) { // typesForWeaving.contains(interfaceTypename)) {
          weaveParentsFor(typesForWeaving, interfaceTypename, resolvedSuperInterface);
        }
      }
    }
    ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_DECLARE_PARENTS,
        resolvedTypeToWeave.getName());
    weaveParentTypeMungers(resolvedTypeToWeave);
    CompilationAndWeavingContext.leavingPhase(tok);
    typesForWeaving.remove(typeToWeave);
    resolvedTypeToWeave.tagAsTypeHierarchyComplete();
View Full Code Here


  }

  private void weaveAndNotify(UnwovenClassFile classFile, BcelObjectType classType, IWeaveRequestor requestor) throws IOException {
    trace.enter("weaveAndNotify", this, new Object[] { classFile, classType, requestor });

    ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.WEAVING_TYPE, classType
        .getResolvedTypeX().getName());
    LazyClassGen clazz = weaveWithoutDump(classFile, classType);
    classType.finishedWith();
    // clazz is null if the classfile was unchanged by weaving...
    if (clazz != null) {
View Full Code Here

    }
    return didSomething;
  }

  public void weaveNormalTypeMungers(ResolvedType onType) {
    ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_TYPE_MUNGERS,
        onType.getName());
    if (onType.isRawType() || onType.isParameterizedType()) {
      onType = onType.getGenericType();
    }
    for (ConcreteTypeMunger m : typeMungerList) {
View Full Code Here

  public boolean shouldOverwrite() {
    return false;
  }

  public boolean munge(BcelClassWeaver weaver) {
    ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.MUNGING_WITH, this);
    boolean changed = false;
    boolean worthReporting = true;

    if (weaver.getWorld().isOverWeaving()) {
      WeaverStateInfo typeWeaverState = weaver.getLazyClassGen().getType().getWeaverState();
View Full Code Here

  private static boolean captureLowLevelContext = false;

  private boolean match(BcelShadow shadow, List<BcelShadow> shadowAccumulator) {
    // Duplicate blocks - one with context one without, seems faster than multiple 'ifs'
    if (captureLowLevelContext) {
      ContextToken shadowMatchToken = CompilationAndWeavingContext.enteringPhase(
          CompilationAndWeavingContext.MATCHING_SHADOW, shadow);
      boolean isMatched = false;

      Shadow.Kind shadowKind = shadow.getKind();
      List<ShadowMunger> candidateMungers = indexedShadowMungers[shadowKind.getKey()];

      // System.out.println("Candidates " + candidateMungers);
      if (candidateMungers != null) {
        for (ShadowMunger munger : candidateMungers) {

          ContextToken mungerMatchToken = CompilationAndWeavingContext.enteringPhase(
              CompilationAndWeavingContext.MATCHING_POINTCUT, munger.getPointcut());
          if (munger.match(shadow, world)) {
            shadow.addMunger(munger);
            isMatched = true;
            if (shadow.getKind() == Shadow.StaticInitialization) {
View Full Code Here

    // the list than outer shadows. That's fine. This order is preserved if:

    // A preceeds B iff B.getStart() is LATER THAN A.getStart().

    for (BcelShadow shadow : shadows) {
      ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.IMPLEMENTING_ON_SHADOW,
          shadow);
      shadow.implement();
      CompilationAndWeavingContext.leavingPhase(tok);
    }
    // int ii =
View Full Code Here

  public String toString() {
    return "(BcelTypeMunger " + getMunger() + ")";
  }

  public boolean munge(BcelClassWeaver weaver) {
    ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.MUNGING_WITH, this);
    boolean changed = false;
    boolean worthReporting = true;
   
    if (munger.getKind() == ResolvedTypeMunger.Field) {
      changed = mungeNewField(weaver, (NewFieldTypeMunger)munger);
View Full Code Here

    }
  }
 
    private boolean match(BcelShadow shadow, List shadowAccumulator) {
      //System.err.println("match: " + shadow);
      ContextToken shadowMatchToken = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.MATCHING_SHADOW, shadow);
        boolean isMatched = false;
        for (Iterator i = shadowMungers.iterator(); i.hasNext(); ) {
            ShadowMunger munger = (ShadowMunger)i.next();
            ContextToken mungerMatchToken = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.MATCHING_POINTCUT, munger.getPointcut());
            if (munger.match(shadow, world)) {
             
        WeaverMetrics.recordMatchResult(true);// Could pass: munger
                shadow.addMunger(munger);
                isMatched = true;
View Full Code Here

       
        // A preceeds B iff B.getStart() is LATER THAN A.getStart().
       
        for (Iterator i = shadows.iterator(); i.hasNext(); ) {
            BcelShadow shadow = (BcelShadow)i.next();
            ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.IMPLEMENTING_ON_SHADOW,shadow);
            shadow.implement();
            CompilationAndWeavingContext.leavingPhase(tok);
        }
    int ii = mg.getMaxLocals();
    mg.matchedShadows = null;
View Full Code Here

  public void beforeProcessing(CompilationUnitDeclaration unit) {
    eWorld.showMessage(IMessage.INFO, "compiling " + new String(unit.getFileName()), null, null);
    processingToken = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_COMPILATION_UNIT,unit.getFileName());
    if (inJava5Mode && !noAtAspectJAnnotationProcessing) {
      ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.ADDING_AT_ASPECTJ_ANNOTATIONS, unit.getFileName());
      AddAtAspectJAnnotationsVisitor atAspectJVisitor = new AddAtAspectJAnnotationsVisitor(unit);
      unit.traverse(atAspectJVisitor, unit.scope);
      CompilationAndWeavingContext.leavingPhase(tok);
    }   
  }
View Full Code Here

TOP

Related Classes of org.aspectj.bridge.context.ContextToken

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.