Package org.aspectj.bridge

Examples of org.aspectj.bridge.IMessage


    IMessage msg = MessageUtil.error(WeaverMessages.format(msgid, onType.getName()), getSourceLocation());
    weaver.getWorld().getMessageHandler().handleMessage(msg);
  }

  private void signalWarning(String msgString, BcelClassWeaver weaver) {
    IMessage msg = MessageUtil.warn(msgString, getSourceLocation());
    weaver.getWorld().getMessageHandler().handleMessage(msg);
  }
View Full Code Here


    IMessage msg = MessageUtil.warn(msgString, getSourceLocation());
    weaver.getWorld().getMessageHandler().handleMessage(msg);
  }

  private void signalError(String msgString, BcelClassWeaver weaver) {
    IMessage msg = MessageUtil.error(msgString, getSourceLocation());
    weaver.getWorld().getMessageHandler().handleMessage(msg);
  }
View Full Code Here

            NewConstructorTypeMunger nctm = (NewConstructorTypeMunger) element.getMunger();
            itdMatch = declA.matches(nctm.getSignature(), world);
          }
        }
        if (!itdMatch) {
          IMessage message = null;
          if (isDeclareAtField) {
            message = new Message("The field '" + declA.getSignaturePattern().toString() + "' does not exist",
                declA.getSourceLocation(), true);
          } else {
            message = new Message("The method '" + declA.getSignaturePattern().toString() + "' does not exist",
View Full Code Here

      }
      return true;
    }

    public void error(BcelClassWeaver weaver,String text,ISourceLocation primaryLoc,ISourceLocation[] extraLocs) {
        IMessage msg = new Message(text, primaryLoc, true, extraLocs);
        weaver.getWorld().getMessageHandler().handleMessage(msg);
    }
View Full Code Here

      }
    }
  }

  private void signalError(String msgid,BcelClassWeaver weaver,UnresolvedType onType) {
    IMessage msg = MessageUtil.error(
        WeaverMessages.format(msgid,onType.getName()),getSourceLocation());
    weaver.getWorld().getMessageHandler().handleMessage(msg);
  }
View Full Code Here

            NewConstructorTypeMunger nctm = (NewConstructorTypeMunger)element.getMunger();
            itdMatch = declA.getSignaturePattern().matches(nctm.getSignature(),world,false);             
          }
        }
          if (!itdMatch) {
            IMessage message = null;
            if (isDeclareAtField) {
              message = new Message(
                "The field '"+ declA.getSignaturePattern().toString() +
                "' does not exist", declA.getSourceLocation() , true);
          } else {
View Full Code Here

      }
    }
   
    public void flushMessages () {
            for (Iterator iter = messages.iterator(); iter.hasNext();) {
                IMessage message = (IMessage)iter.next();
                super.handleMessage(message);
            }
      accumulating = false;
      messages.clear();
    }
View Full Code Here

          inStream.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 boolean openOutputStream(File outJar)  {
    try {
      OutputStream os = FileUtil.makeOutputStream(buildConfig.getOutputJar());
      zos = new JarOutputStream(os,getWeaver().getManifest(true));
    } catch (IOException ex) {
      IMessage message =
        new Message("Unable to open outjar "
                + outJar.getPath()
                + "(" + ex.getMessage()
                + ")",
              new SourceLocation(outJar,0),
View Full Code Here

      /* Ensure we don't write an incomplete JAR bug-71339 */
      if (handler.hasErrors()) {
        outJar.delete();
      }
    } catch (IOException ex) {
      IMessage message =
        new Message("Unable to write outjar "
                + outJar.getPath()
                + "(" + ex.getMessage()
                + ")",
              new SourceLocation(outJar,0),
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.