Package lombok.ast

Examples of lombok.ast.StringLiteral


                        AnnotationValue valueNode = element.astValue();
                        if (valueNode == null) {
                            continue;
                        }
                        if (valueNode instanceof StringLiteral) {
                            StringLiteral literal = (StringLiteral) valueNode;
                            String value = literal.astValue();
                            if (value.equalsIgnoreCase(SUPPRESS_ALL) ||
                                    issue != null && issue.getId().equalsIgnoreCase(value)) {
                                return true;
                            }
                        } else if (valueNode instanceof ArrayInitializer) {
View Full Code Here


                        AnnotationValue valueNode = element.astValue();
                        if (valueNode == null) {
                            continue;
                        }
                        if (valueNode instanceof StringLiteral) {
                            StringLiteral literal = (StringLiteral) valueNode;
                            String value = literal.astValue();
                            if (value.equalsIgnoreCase(SUPPRESS_ALL) ||
                                    issue != null && issue.getId().equalsIgnoreCase(value)) {
                                return true;
                            }
                        } else if (valueNode instanceof ArrayInitializer) {
View Full Code Here

        return;
      case CHAR_LITERAL:
        set(node, new CharLiteral().astValue((Character)val));
        return;
      case STRING_LITERAL:
        set(node, new StringLiteral().astValue(val == null ? "" : val.toString()));
        return;
      case NULL_LITERAL:
        set(node, new NullLiteral());
        return;
      }
View Full Code Here

    if (val == null) {
      output.append("[NULL]\n");
    } else {
      String content;
      if (val instanceof String) {
        content = new StringLiteral().astValue(val.toString()).rawValue();
      } else {
        content = String.valueOf(val);
      }
      output.append("[").append(val.getClass().getSimpleName()).append(" ").append(content).append("]\n");
    }
View Full Code Here

  public Node createNullLiteral(String raw) {
    return posify(new NullLiteral().rawValue(raw));
  }
 
  public Node createStringLiteral(String raw) {
    return posify(new StringLiteral().rawValue(raw));
  }
View Full Code Here

                        AnnotationValue valueNode = element.astValue();
                        if (valueNode == null) {
                            continue;
                        }
                        if (valueNode instanceof StringLiteral) {
                            StringLiteral literal = (StringLiteral) valueNode;
                            String value = literal.astValue();
                            if (matches(issue, value)) {
                                return true;
                            }
                        } else if (valueNode instanceof ArrayInitializer) {
                            ArrayInitializer array = (ArrayInitializer) valueNode;
View Full Code Here

          String left = ((StringLiteral) node.rawLeft()).astValue();
          String right = ((StringLiteral) node.rawRight()).astValue();
          int start = node.rawLeft().getPosition().getStart();
          int end = node.rawRight().getPosition().getEnd();
          if (left != null && right != null && node.getParent() != null) {
            node.getParent().replaceChild(node, new StringLiteral().astValue(left + right).setPosition(new Position(start, end)));
          }
        }
        return true;
      }
    });
View Full Code Here

        if (left == null || right == null) return true;
       
        int start = node.rawLeft().getPosition().getStart();
        int end = node.rawRight().getPosition().getEnd();
       
        node.getParent().replaceChild(node, new StringLiteral().astValue(left + right).setPosition(new Position(start, end)));
       
        return true;
      }
    });
  }
View Full Code Here

TOP

Related Classes of lombok.ast.StringLiteral

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.