Examples of ASTException


Examples of lombok.ast.AstException

    }
  }
 
  public List<AstException> getProblems() {
    List<AstException> p = Lists.newArrayList(problems);
    if (!nodeStack.isEmpty()) p.add(new AstException(nodeStack.peek(), "This node was never closed"));
    return p;
  }
View Full Code Here

Examples of lombok.ast.AstException

  private void registerNode(Node node) {
    nodeStack.add(node);
    if (node == null) return;
   
    Position p = node.getPosition();
    if (p.isUnplaced()) problems.add(new AstException(node, String.format(
        "this node is unplaced [%s]", node.getClass().getSimpleName())));
    else {
      int delta = p.getStart() - getCurrentPosition(true);
      if (delta != 0) {
        int actualPos = getCurrentPosition(true);
View Full Code Here

Examples of lombok.ast.AstException

  private void checkNodeClose() {
    Node node = nodeStack.pop();
    if (node == null) return;
    Position p = node.getPosition();
    if (p.isUnplaced()) return//opener already generated error.
    if (p.getStart() > p.getEnd()) problems.add(new AstException(node, "Node ends before it starts."));
    int delta = p.getEnd() - Math.max(getCurrentPosition(false), p.getStart());
    if (delta != 0) {
      int actualPos = getCurrentPosition(false);
      int repPos = p.getEnd();
      reportError(node, "end", actualPos, repPos);
View Full Code Here

Examples of lombok.ast.AstException

    String raw = source.getRawInput();
    String actualPrefix = getCharsBeforePosition(actualPos, raw);
    String actualPostfix = getCharsAfterPosition(actualPos, raw);
    String reportedPrefix = getCharsBeforePosition(repPos, raw);
    String reportedPostfix = getCharsAfterPosition(repPos, raw);
    problems.add(new AstException(node, String.format(
      "this[%s] node's " + description + " is misreported with %+d\nactual(%d): \"%s⊚%s\"\nreported(%d): \"%s⊚%s\"\n%s",
      node.getClass().getSimpleName(),
      delta, actualPos, actualPrefix, actualPostfix, repPos, reportedPrefix, reportedPostfix, node)));
  }
View Full Code Here

Examples of org.jboss.aop.pointcut.ast.ASTException

   {
      if (nodeExceptions.size() > foundExceptions.length) return false;
      for (Iterator<ASTException> it = nodeExceptions.iterator(); it.hasNext();)
      {
         boolean found = false;
         ASTException ex = it.next();
         for (int i = 0; i < foundExceptions.length; i++)
         {
            if (ex.getType().matches(foundExceptions[i].getName()))
            {
               found = true;
               break;
            }
         }
View Full Code Here

Examples of org.jboss.aop.pointcut.ast.ASTException

   {
      if (nodeExceptions.size() > foundExceptions.length) return false;
      for (Iterator<ASTException> it = nodeExceptions.iterator(); it.hasNext();)
      {
         boolean found = false;
         ASTException ex = it.next();
         for (int i = 0; i < foundExceptions.length; i++)
         {
            if (ex.getType().matches(foundExceptions[i].getName()))
            {
               found = true;
               break;
            }
         }
View Full Code Here

Examples of org.jboss.aop.pointcut.ast.ASTException

   {
      if (nodeExceptions.size() > foundExceptions.length) return false;
      for (Iterator<ASTException> it = nodeExceptions.iterator(); it.hasNext();)
      {
         boolean found = false;
         ASTException ex = it.next();
         for (int i = 0; i < foundExceptions.length; i++)
         {
            if (ex.getType().matches(foundExceptions[i].getName()))
            {
               found = true;
               break;
            }
         }
View Full Code Here

Examples of org.jboss.aop.pointcut.ast.ASTException

   {
      if (nodeExceptions.size() > foundExceptions.length) return false;
      for (Iterator<ASTException> it = nodeExceptions.iterator(); it.hasNext();)
      {
         boolean found = false;
         ASTException ex = it.next();
         for (int i = 0; i < foundExceptions.length; i++)
         {
            if (ex.getType().matches(foundExceptions[i].getName()))
            {
               found = true;
               break;
            }
         }
View Full Code Here

Examples of org.jboss.aop.pointcut.ast.ASTException

   {
      if (nodeExceptions.size() > foundExceptions.length) return false;
      for (Iterator it = nodeExceptions.iterator(); it.hasNext();)
      {
         boolean found = false;
         ASTException ex = (ASTException) it.next();
         for (int i = 0; i < foundExceptions.length; i++)
         {
            if (ex.getType().matches(foundExceptions[i].getName()))
            {
               found = true;
               break;
            }
         }
View Full Code Here

Examples of org.jboss.aop.pointcut.ast.ASTException

   {
      if (nodeExceptions.size() > foundExceptions.length) return false;
      for (Iterator it = nodeExceptions.iterator(); it.hasNext();)
      {
         boolean found = false;
         ASTException ex = (ASTException) it.next();
         for (int i = 0; i < foundExceptions.length; i++)
         {
            if (ex.getType().matches(foundExceptions[i].getName()))
            {
               found = true;
               break;
            }
         }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.