Package org.aspectj.bridge

Examples of org.aspectj.bridge.IMessage


      this.typePattern = typePattern.resolveBindings(scope,bindings,false,false);
      resolved = true;
      if (typePattern instanceof ExactTypePattern) {
        ExactTypePattern et = (ExactTypePattern)typePattern;
      if (!et.getExactType().resolve(scope.getWorld()).isAnnotation()) {
        IMessage m = MessageUtil.error(
            WeaverMessages.format(WeaverMessages.REFERENCE_TO_NON_ANNOTATION_TYPE,et.getExactType().getName()),
            getSourceLocation());
        scope.getWorld().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

  /**
   * @param scope
   */
  private 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

                // check for "just quit -- message printed already"
                if (((AbortException)t).isSilent()) {
                    t = null;
                    break;
                }
                IMessage m = ((AbortException) t).getIMessage();
                if (null == m) {
                    break;
                } else {
                    Throwable tt = m.getThrown();
                    if (null != tt) {
                        t = tt;  
                    } else {
                        break;
                    }
View Full Code Here

        // make sure we handle out of memory gracefully...
        try {
          // byte[] b = new byte[100000000]; for testing OoME only!
          run(args, holder);
        } catch (OutOfMemoryError outOfMemory) {
          IMessage outOfMemoryMessage = new Message(OUT_OF_MEMORY_MSG,null,true);
          holder.handleMessage(outOfMemoryMessage);
          systemExit(holder)// we can't reasonably continue from this point.
        }

        boolean skipExit = false;
View Full Code Here

            }
        } catch (AbortException ae) {
          if (ae.isSilent()) {
            quit();
          } else {
                IMessage message = ae.getIMessage();
                Throwable thrown = ae.getThrown();
                if (null == thrown) { // toss AbortException wrapper
                    if (null != message) {
                        holder.handleMessage(message);
                    } else {
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

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

    boolean cellHasFocus) {
            String label = "<no message>";
            String detail = null;
            IMessage.Kind kind = IMessage.ERROR;
            if (value instanceof IMessage) {
        IMessage cm = (IMessage) value;
                label = cm.getMessage();
                if (LangUtil.isEmpty(label)) {
                    label = cm.getMessage().toString();
                }
                kind = cm.getKind();
                Throwable thrown = cm.getThrown();
                if (null != thrown) {
                    detail = LangUtil.renderException(thrown);
                }
            } else if (null != value) {
                label = value.toString();
View Full Code Here

        {
            IMessage[] errorMessages = messageHandler.getMessages( IMessage.ERROR, true );

            for ( int i = 0; i < errorMessages.length; i++ )
            {
                IMessage m = errorMessages[i];

                ISourceLocation sourceLocation = m.getSourceLocation();
                CompilerError error;

                if ( sourceLocation == null )
                {
                    error = new CompilerError( m.getMessage(), true );
                }
                else
                {
                    error = new CompilerError( sourceLocation.getSourceFile().getPath(), true,
                                               sourceLocation.getLine(), sourceLocation.getColumn(), sourceLocation
                                                   .getEndLine(), sourceLocation.getColumn(), m.getMessage() );
                }
                messages.add( error );
            }
        }
View Full Code Here

TOP

Related Classes of org.aspectj.bridge.IMessage

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.