Package org.aspectj.weaver

Examples of org.aspectj.weaver.IHasPosition


    }
  }

 
  private void reportError(Parser parser, ParserException pe) {
    IHasPosition tok = pe.getLocation();
    int start, end;
    if (tok == IToken.EOF) {
      start = sourceEnd+1;
      end = sourceEnd+1;
    } else {
      start = tok.getStart();
      end = tok.getEnd();
    }
    String found = "<unknown>";
    if (tok instanceof IToken) {
      found = ((IToken)tok).getString();
    }
View Full Code Here


  private String buildUserMessageFromParserException(String pc, ParserException ex) {
    StringBuffer msg = new StringBuffer();
    msg.append("Pointcut is not well-formed: expecting '");
    msg.append(ex.getMessage());
    msg.append("'");
    IHasPosition location = ex.getLocation();
    msg.append(" at character position ");
    msg.append(location.getStart());
    msg.append("\n");
    msg.append(pc);
    msg.append("\n");
    for (int i = 0; i < location.getStart(); i++) {
      msg.append(" ");
    }
    for (int j = location.getStart(); j <= location.getEnd(); j++) {
      msg.append("^");
    }
    msg.append("\n");
    return msg.toString();
  }
View Full Code Here

  private String buildUserMessageFromParserException(String pc, ParserException ex) {
    StringBuffer msg = new StringBuffer();
    msg.append("Pointcut is not well-formed: expecting '");
    msg.append(ex.getMessage());
    msg.append("'");
    IHasPosition location = ex.getLocation();
    msg.append(" at character position ");
    msg.append(location.getStart());
    msg.append("\n");
    msg.append(pc);
    msg.append("\n");
    for (int i = 0; i < location.getStart(); i++) {
      msg.append(" ");
    }
    for (int j = location.getStart(); j <= location.getEnd(); j++) {
      msg.append("^");
    }
    msg.append("\n");
    return msg.toString();
  }
View Full Code Here

  private String buildUserMessageFromParserException(String pc, ParserException ex) {
    StringBuffer msg = new StringBuffer();
    msg.append("Pointcut is not well-formed: expecting '");
    msg.append(ex.getMessage());
    msg.append("'");
    IHasPosition location = ex.getLocation();
    msg.append(" at character position ");
    msg.append(location.getStart());
    msg.append("\n");
    msg.append(pc);
    msg.append("\n");
    for (int i = 0; i < location.getStart(); i++) {
      msg.append(" ");
    }
    for (int j=location.getStart(); j <= location.getEnd(); j++) {
      msg.append("^");
    }
    msg.append("\n");
    return msg.toString();
  }
View Full Code Here

    }
  }

 
  private void reportError(Parser parser, ParserException pe) {
    IHasPosition tok = pe.getLocation();
    int start, end;
    if (tok == IToken.EOF) {
      start = sourceEnd+1;
      end = sourceEnd+1;
    } else {
      start = tok.getStart();
      end = tok.getEnd();
    }
    String found = "<unknown>";
    if (tok instanceof IToken) {
      found = ((IToken)tok).getString();
    }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.IHasPosition

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.