Examples of coerceLiteral()


Examples of com.google.gwt.dev.jjs.ast.JPrimitiveType.coerceLiteral()

    }
    if ((type instanceof JPrimitiveType) && (exp instanceof JValueLiteral)) {
      // Statically evaluate casting literals.
      JPrimitiveType typePrim = (JPrimitiveType) type;
      JValueLiteral expLit = (JValueLiteral) exp;
      JValueLiteral casted = typePrim.coerceLiteral(expLit);
      if (casted != null) {
        return casted;
      }
    }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JPrimitiveType.coerceLiteral()

           */
          // TODO(spoon): use simplifier.cast to shorten this
          if ((x.getType() instanceof JPrimitiveType)
              && (lit instanceof JValueLiteral)) {
            JPrimitiveType xTypePrim = (JPrimitiveType) x.getType();
            lit = xTypePrim.coerceLiteral((JValueLiteral) lit);
          }
          return lit;
        }
      }
      return null;
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JPrimitiveType.coerceLiteral()

           */
          // TODO(spoon): use simplifier.cast to shorten this
          if ((x.getType() instanceof JPrimitiveType)
              && (lit instanceof JValueLiteral)) {
            JPrimitiveType xTypePrim = (JPrimitiveType) x.getType();
            lit = xTypePrim.coerceLiteral((JValueLiteral) lit);
          }
          return lit;
        }
      }
      return null;
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JPrimitiveType.coerceLiteral()

    }
    if ((type instanceof JPrimitiveType) && (exp instanceof JValueLiteral)) {
      // Statically evaluate casting literals.
      JPrimitiveType typePrim = (JPrimitiveType) type;
      JValueLiteral expLit = (JValueLiteral) exp;
      JValueLiteral casted = typePrim.coerceLiteral(expLit);
      if (casted != null) {
        return casted;
      }
    }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JPrimitiveType.coerceLiteral()

      }
      if ((type instanceof JPrimitiveType) && (exp instanceof JValueLiteral)) {
        // Statically evaluate casting literals.
        JPrimitiveType typePrim = (JPrimitiveType) type;
        JValueLiteral expLit = (JValueLiteral) exp;
        JValueLiteral casted = typePrim.coerceLiteral(expLit);
        if (casted != null) {
          return casted;
        }
      }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JPrimitiveType.coerceLiteral()

           */
          // TODO(spoon): use simplifier.cast to shorten this
          if ((x.getType() instanceof JPrimitiveType)
              && (lit instanceof JValueLiteral)) {
            JPrimitiveType xTypePrim = (JPrimitiveType) x.getType();
            lit = xTypePrim.coerceLiteral((JValueLiteral) lit);
          }
          return lit;
        }
      }
      return null;
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JPrimitiveType.coerceLiteral()

        return arg;
      }
      if (arg instanceof JValueLiteral && targetType instanceof JPrimitiveType) {
        // Attempt to coerce the literal.
        JPrimitiveType primitiveType = (JPrimitiveType) targetType;
        JValueLiteral coerced = primitiveType.coerceLiteral((JValueLiteral) arg);
        if (coerced != null) {
          return coerced;
        }
      }
      // Synthesize a cast to long to force explicit conversion.
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JPrimitiveType.coerceLiteral()

    }
    if ((type instanceof JPrimitiveType) && (exp instanceof JValueLiteral)) {
      // Statically evaluate casting literals.
      JPrimitiveType typePrim = (JPrimitiveType) type;
      JValueLiteral expLit = (JValueLiteral) exp;
      JValueLiteral casted = typePrim.coerceLiteral(expLit);
      if (casted != null) {
        return casted;
      }
    }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JPrimitiveType.coerceLiteral()

           */
          // TODO(spoon): use simplifier.cast to shorten this
          if ((x.getType() instanceof JPrimitiveType)
              && (lit instanceof JValueLiteral)) {
            JPrimitiveType xTypePrim = (JPrimitiveType) x.getType();
            lit = xTypePrim.coerceLiteral((JValueLiteral) lit);
          }
          return lit;
        }
      }
      return null;
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JPrimitiveType.coerceLiteral()

           */
          // TODO(spoon): use simplifier.cast to shorten this
          if ((x.getType() instanceof JPrimitiveType)
              && (lit instanceof JValueLiteral)) {
            JPrimitiveType xTypePrim = (JPrimitiveType) x.getType();
            lit = xTypePrim.coerceLiteral((JValueLiteral) lit);
          }
          return lit;
        }
      }
      return null;
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.