Package org.aspectj.bridge

Examples of org.aspectj.bridge.IMessageHandler


  private void ensureAspectJAttributesUnpacked() {
    if ((bitflag & UNPACKED_AJATTRIBUTES) != 0) {
      return;
    }
    bitflag |= UNPACKED_AJATTRIBUTES;
    IMessageHandler msgHandler = getResolvedTypeX().getWorld().getMessageHandler();
    // Pass in empty list that can store things for readAj5 to process
    List<AjAttribute> l = null;
    try {
      l = Utility.readAjAttributes(className, javaClass.getAttributes(), getResolvedTypeX().getSourceContext(),
          getResolvedTypeX().getWorld(), AjAttribute.WeaverVersionInfo.UNKNOWN, new BcelConstantPoolReader(javaClass
              .getConstantPool()));
    } catch (RuntimeException re) {
      throw new RuntimeException("Problem processing attributes in " + javaClass.getFileName(), re);
    }
    List<ResolvedPointcutDefinition> pointcuts = new ArrayList<ResolvedPointcutDefinition>();
    typeMungers = new ArrayList<ConcreteTypeMunger>();
    declares = new ArrayList<Declare>();
    processAttributes(l, pointcuts, false);
    l = AtAjAttributes.readAj5ClassAttributes(((BcelWorld) getResolvedTypeX().getWorld()).getModelAsAsmManager(), javaClass,
        getResolvedTypeX(), getResolvedTypeX().getSourceContext(), msgHandler, isCodeStyleAspect);
    AjAttribute.Aspect deferredAspectAttribute = processAttributes(l, pointcuts, true);

    if (pointcuts.size() == 0) {
      this.pointcuts = ResolvedPointcutDefinition.NO_POINTCUTS;
    } else {
      this.pointcuts = pointcuts.toArray(new ResolvedPointcutDefinition[pointcuts.size()]);
    }

    resolveAnnotationDeclares(l);

    if (deferredAspectAttribute != null) {
      // we can finally process the aspect and its associated perclause...
      perClause = deferredAspectAttribute.reifyFromAtAspectJ(this.getResolvedTypeX());
    }
    if (isAspect() && !Modifier.isAbstract(getModifiers()) && isGeneric()) {
      msgHandler.handleMessage(MessageUtil.error("The generic aspect '" + getResolvedTypeX().getName()
          + "' must be declared abstract", getResolvedTypeX().getSourceLocation()));
    }

  }
View Full Code Here


    this.inJava5Mode = false;
    this.noAtAspectJAnnotationProcessing = noAtAspectJProcessing;
   
    if (compiler.options.complianceLevel == CompilerOptions.JDK1_5) inJava5Mode = true;
   
    IMessageHandler msgHandler = world.getMessageHandler();
    weaverMessageHandler = new WeaverMessageHandler(msgHandler, compiler);
    world.setMessageHandler(weaverMessageHandler);
  }
View Full Code Here

      return supportedPrimitives;
    }
   
    /* for testing */
    IMessageHandler setCustomMessageHandler(IMessageHandler aHandler) {
      IMessageHandler current = getWorld().getMessageHandler();
      getWorld().setMessageHandler(aHandler);
      return current;
    }
View Full Code Here

        {
        MessageHandler handler = new MessageHandler();
        if (!verbose) {
          handler.ignore(IMessage.INFO);
        }
        final IMessageHandler delegate
          = verbose ? MessagePrinter.VERBOSE: MessagePrinter.TERSE;
      handler.setInterceptor(delegate);
      holder = handler;
        }
        try {
View Full Code Here

TOP

Related Classes of org.aspectj.bridge.IMessageHandler

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.