Package org.aspectj.bridge

Examples of org.aspectj.bridge.Message


    if (maybeGetSimpleName() != null) {
      return FuzzyBoolean.NO;
    }

    type.getWorld().getMessageHandler().handleMessage(
        new Message("can't do instanceof matching on patterns with wildcards", IMessage.ERROR, null, getSourceLocation()));
    return FuzzyBoolean.NO;
  }
View Full Code Here


    message(kind, location1, message);
    message(kind, location2, message);
  }

  public void message(IMessage.Kind kind, IHasPosition location, String message) {
    getMessageHandler().handleMessage(new Message(message, kind, null, makeSourceLocation(location)));
  }
View Full Code Here

      for (Iterator i = slots.iterator(); i.hasNext();) {
        Slot slot = (Slot) i.next();
        ResolvedType rt = slot.formalType;
        if (rt.isMissing()) {
          ISourceLocation[] locs = new ISourceLocation[] { getSourceLocation() };
          Message m = new Message(WeaverMessages.format(WeaverMessages.MISSING_TYPE_PREVENTS_MATCH, rt.getName()), "",
              Message.WARNING, shadow.getSourceLocation(), null, locs);
          rt.getWorld().getMessageHandler().handleMessage(m);
          return FuzzyBoolean.NO;
        }
      }
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

            new RuntimeException("Crashed whilst crashing with this exception: " + e, e).printStackTrace();
            // recover from crash whilst producing debug string
            classDebugInfo = clazz.getClassName();
          }
          String messageText = "trouble in: \n" + classDebugInfo;
          getWorld().getMessageHandler().handleMessage(new Message(messageText, IMessage.ABORT, re, null));
        } catch (Error re) {
          String classDebugInfo = null;
          try {
            classDebugInfo = clazz.toLongString();
          } catch (OutOfMemoryError oome) {
            System.err.println("Ran out of memory creating debug info for an error");
            re.printStackTrace(System.err);
            // recover from crash whilst producing debug string
            classDebugInfo = clazz.getClassName();
          } catch (Throwable e) {
            // recover from crash whilst producing debug string
            classDebugInfo = clazz.getClassName();
          }
          String messageText = "trouble in: \n" + classDebugInfo;
          getWorld().getMessageHandler().handleMessage(new Message(messageText, IMessage.ABORT, re, null));
        }
      } else {
        checkDeclareTypeErrorOrWarning(world, classType);
      }
      // this is very odd return behavior trying to keep everyone happy
View Full Code Here

   * convenenience method for creating and issuing messages via the message handler - if you supply two locations you will get two
   * messages.
   */
  public void showMessage(Kind kind, String message, ISourceLocation loc1, ISourceLocation loc2) {
    if (loc1 != null) {
      messageHandler.handleMessage(new Message(message, kind, null, loc1));
      if (loc2 != null) {
        messageHandler.handleMessage(new Message(message, kind, null, loc2));
      }
    } else {
      messageHandler.handleMessage(new Message(message, kind, null, loc2));
    }
  }
View Full Code Here

            }
            if (order != 0 && order != thisOrder) {
              ISourceLocation[] isls = new ISourceLocation[2];
              isls[0] = orderer.getSourceLocation();
              isls[1] = d.getSourceLocation();
              Message m = new Message("conflicting declare precedence orderings for aspects: "
                  + firstAspect.getName() + " and " + secondAspect.getName(), null, true, isls);
              world.getMessageHandler().handleMessage(m);
            } else {
              order = thisOrder;
            }
View Full Code Here

  protected boolean warn(String message) {
    return MessageUtil.warn(messageHandler, message);
  }

  protected boolean warn(String message, Throwable th) {
    return messageHandler.handleMessage(new Message(message, IMessage.WARNING, th, null));
  }
View Full Code Here

  protected boolean error(String message) {
    return MessageUtil.error(messageHandler, message);
  }

  protected boolean error(String message, Throwable th) {
    return messageHandler.handleMessage(new Message(message, IMessage.ERROR, th, null));
  }
View Full Code Here

          // ignore for @AJ ITD as munger.getSignature() is the
          // interface method hence abstract
        } else {
          world.getMessageHandler()
              .handleMessage(
                  new Message("must implement abstract inter-type declaration: " + munger.getSignature(), "",
                      IMessage.ERROR, getSourceLocation(), null,
                      new ISourceLocation[] { getMungerLocation(munger) }));
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.aspectj.bridge.Message

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.