Package lombok.ast

Examples of lombok.ast.FloatingPointLiteral


        if (longValue == Long.MIN_VALUE) literal = new IntegralLiteral().astLongValue(Long.MIN_VALUE);
        else if (negative) literal = new IntegralLiteral().astLongValue(-longValue);
        else literal = new IntegralLiteral().astLongValue(longValue);
        break;
      case FLOAT_LITERAL:
        set(node, new FloatingPointLiteral().astFloatValue(((Number)val).floatValue()));
        return;
      case DOUBLE_LITERAL:
        set(node, new FloatingPointLiteral().astDoubleValue(((Number)val).doubleValue()));
        return;
      case BOOLEAN_LITERAL:
        set(node, new BooleanLiteral().astValue((Boolean)val));
        return;
      case CHAR_LITERAL:
View Full Code Here


    if (raw == null) return posify(new IntegralLiteral());
   
    String v = raw.trim().toLowerCase();
   
    if (v.startsWith("0x")) {
      if (v.contains("p")) return posify(new FloatingPointLiteral().rawValue(raw));
      return posify(new IntegralLiteral().rawValue(raw));
    }
   
    if (v.contains(".") || v.endsWith("d") || v.endsWith("f") || v.contains("e")) {
      return posify(new FloatingPointLiteral().rawValue(raw));
    }
    else return posify(new IntegralLiteral().rawValue(raw));
  }
View Full Code Here

TOP

Related Classes of lombok.ast.FloatingPointLiteral

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.