Package org.aspectj.bridge

Examples of org.aspectj.bridge.IMessage$Kind


  protected FuzzyBoolean matchInternal(Shadow shadow) {
    ResolvedType enclosingType = shadow.getIWorld().resolve(shadow.getEnclosingType(), true);
    if (enclosingType.isMissing()) {
      // PTWIMPL ?? Add a proper message
      IMessage msg = new Message("Cant find type pertypewithin matching...", shadow.getSourceLocation(), true,
          new ISourceLocation[] { getSourceLocation() });
      shadow.getIWorld().getMessageHandler().handleMessage(msg);
    }

    // See pr106554 - we can't put advice calls in an interface when the
View Full Code Here


    }
    resolved = true;
    annotationType = annotationType.resolve(world);
    ResolvedType resolvedAnnotationType = (ResolvedType) annotationType;
    if (!resolvedAnnotationType.isAnnotation()) {
      IMessage m = MessageUtil.error(WeaverMessages.format(WeaverMessages.REFERENCE_TO_NON_ANNOTATION_TYPE, annotationType
          .getName()), getSourceLocation());
      world.getMessageHandler().handleMessage(m);
      resolved = false;
    }
    if (annotationType.isTypeVariableReference()) {
View Full Code Here

  }

  private void verifyRuntimeRetention(World world, ResolvedType resolvedAnnotationType) {
    if (!resolvedAnnotationType.isAnnotationWithRuntimeRetention()) { // default is class visibility
      // default is class visibility
      IMessage m = MessageUtil.error(WeaverMessages.format(WeaverMessages.BINDING_NON_RUNTIME_RETENTION_ANNOTATION,
          annotationType.getName()), getSourceLocation());
      world.getMessageHandler().handleMessage(m);
      resolved = false;
    }
  }
View Full Code Here

  }

  private void verifyRuntimeRetention(ResolvedType rAnnotationType) {
    if (!(rAnnotationType.isAnnotationWithRuntimeRetention())) {
      IMessage m = MessageUtil.error(WeaverMessages.format(WeaverMessages.BINDING_NON_RUNTIME_RETENTION_ANNOTATION,
          rAnnotationType.getName()), getSourceLocation());
      rAnnotationType.getWorld().getMessageHandler().handleMessage(m);
    }
  }
View Full Code Here

    resolved = true;
    formalType = world.resolve(formalType);
    annotationType = world.resolve(annotationType);
    ResolvedType annoType = (ResolvedType) annotationType;
    if (!annoType.isAnnotation()) {
      IMessage m = MessageUtil
          .error(WeaverMessages.format(WeaverMessages.REFERENCE_TO_NON_ANNOTATION_TYPE, annoType.getName()),
              getSourceLocation());
      world.getMessageHandler().handleMessage(m);
      resolved = false;
    }
View Full Code Here

    return (ret.indexOf('.') == -1) ? ret : null;
  }

  protected void verifyIsAnnotationType(ResolvedType type, IScope scope) {
    if (!type.isAnnotation()) {
      IMessage m = MessageUtil.error(WeaverMessages.format(WeaverMessages.REFERENCE_TO_NON_ANNOTATION_TYPE, type.getName()),
          getSourceLocation());
      scope.getWorld().getMessageHandler().handleMessage(m);
      resolved = false;
    }
  }
View Full Code Here

          inJar.close();
        }
        inJar.close();
      }
    } catch (FileNotFoundException ex) {
      IMessage message = new Message("Could not find input jar file " + inFile.getPath() + ", ignoring", new SourceLocation(
          inFile, 0), false);
      world.getMessageHandler().handleMessage(message);
    } catch (IOException ex) {
      IMessage message = new Message("Could not read input jar file " + inFile.getPath() + "(" + ex.getMessage() + ")",
          new SourceLocation(inFile, 0), true);
      world.getMessageHandler().handleMessage(message);
    } finally {
      if (inJar != null) {
        try {
          inJar.close();
        } catch (IOException ex) {
          IMessage message = new Message("Could not close input jar file " + inFile.getPath() + "(" + ex.getMessage()
              + ")", new SourceLocation(inFile, 0), true);
          world.getMessageHandler().handleMessage(message);
        }
      }
    }
View Full Code Here

  private void dumpCompilerMessages(IMessageHolder messageHolder) {
    println("---- Compiler Messages ---");
    if (messageHolder != null) {
      for (Iterator<IMessage> i = messageHolder.getUnmodifiableListView().iterator(); i.hasNext();) {
        IMessage message = i.next();
        println(message.toString());
      }
    } else {
      println(NULL_OR_EMPTY);
    }
  }
View Full Code Here

    if (node.getKind() == Shadow.SynchronizationLock || node.getKind() == Shadow.SynchronizationUnlock)
      synchronizationDesignatorEncountered = true;
    // Check it!
    if (!world.isJoinpointSynchronizationEnabled()) {
      if (node.getKind() == Shadow.SynchronizationLock) {
        IMessage m = MessageUtil.warn(
            "lock() pointcut designator cannot be used without the option -Xjoinpoints:synchronization", p
                .getSourceLocation());
        world.getMessageHandler().handleMessage(m);
      } else if (node.getKind() == Shadow.SynchronizationUnlock) {
        IMessage m = MessageUtil.warn(
            "unlock() pointcut designator cannot be used without the option -Xjoinpoints:synchronization", p
                .getSourceLocation());
        world.getMessageHandler().handleMessage(m);
      }
    }
View Full Code Here

      StringWriter sw = new StringWriter();
      ex.printStackTrace(new PrintWriter(sw));
      StringBuffer sb = new StringBuffer();
      sb.append(CompilationAndWeavingContext.getCurrentContext());
      sb.append(sw.toString());
      IMessage pinpointedMessage = new PinpointedMessage(message,sb.toString());
      return delegate.handleMessage(pinpointedMessage);
    } else {
      return delegate.handleMessage(message);
    }
  }
View Full Code Here

TOP

Related Classes of org.aspectj.bridge.IMessage$Kind

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.