Package com.google.gwt.dev.jjs

Examples of com.google.gwt.dev.jjs.InternalCompilerException$NodeInfo


    }

    private JExpression unbox(JExpression toUnbox, JClassType wrapperType) {
      JPrimitiveType primitiveType = getPrimitiveTypeForWrapperType(wrapperType);
      if (primitiveType == null) {
        throw new InternalCompilerException(toUnbox,
            "Attempt to unbox unexpected type '" + wrapperType.getName() + "'",
            null);
      }

      String valueMethodName = primitiveType.getName() + "Value";
      JMethod valueMethod = null;
      for (Object element : wrapperType.getMethods()) {
        JMethod method = (JMethod) element;
        if (method.getName().equals(valueMethodName)) {
          if (method.getParams().isEmpty()) {
            // It's a match!
            valueMethod = method;
            break;
          }
        }
      }

      if (valueMethod == null) {
        throw new InternalCompilerException(toUnbox,
            "Expected to find a method on '" + wrapperType.getName()
                + "' whose signature matches 'public "
                + primitiveType.getName() + " " + valueMethodName + "()'", null);
      }
View Full Code Here


      Throwable e) {
    if (e instanceof OutOfMemoryError) {
      // Always rethrow OOMs (might have no memory to load ICE class anyway).
      throw (OutOfMemoryError) e;
    }
    InternalCompilerException ice;
    if (e instanceof InternalCompilerException) {
      ice = (InternalCompilerException) e;
    } else {
      ice = new InternalCompilerException("Unexpected error during visit.", e);
    }
    ice.addNode(node);
    return ice;
  }
View Full Code Here

                values = new String[ai.expressions.length];
                for (int i = 0, j = values.length; i < j; i++) {
                  values[i] = ((StringLiteral) ai.expressions[i]).constant.stringValue();
                }
              } else {
                throw new InternalCompilerException(
                    "Unable to analyze SuppressWarnings annotation");
              }

              for (String value : values) {
                for (Iterator<String> it = warnings.keySet().iterator(); it.hasNext();) {
View Full Code Here

            processArtificialRescue((Annotation) e);
          }
        } else if (value instanceof Annotation) {
          processArtificialRescue((Annotation) value);
        } else {
          throw new InternalCompilerException(
              "Unable to process annotation with value of type "
                  + value.getClass().getName());
        }

        return;
View Full Code Here

        for (int i = 0; i < toReturn.length; i++) {
          toReturn[i] = init.expressions[i].constant.stringValue();
        }
        return toReturn;
      } else {
        throw new InternalCompilerException("Unhandled value type "
            + value.getClass().getName());
      }
    }
View Full Code Here

      T node, Throwable e) {
    if (e instanceof OutOfMemoryError) {
      // Always rethrow OOMs (might have no memory to load ICE class anyway).
      throw (OutOfMemoryError) e;
    }
    InternalCompilerException ice;
    if (e instanceof InternalCompilerException) {
      ice = (InternalCompilerException) e;
    } else if (e instanceof OutOfMemoryError) {
      // Just rethrow, it's not our problem.
      throw (OutOfMemoryError) e;
    } else {
      ice = new InternalCompilerException("Unexpected error during visit.", e);
    }
    ice.addNode((HasSourceInfo) node);
    return ice;
  }
View Full Code Here

            jsniRefs.add(ident.substring(1));
          }
        }
      }.acceptList(result);
    } catch (IOException e) {
      throw new InternalCompilerException(e.getMessage(), e);
    } catch (JsParserException e) {
      // ignore, we only care about finding valid references
    }
  }
View Full Code Here

      try {
        reader.reset();
        // Ignore return value, since we know the index is valid.
        reader.skip(idx);
      } catch (IOException e) {
        throw new InternalCompilerException(e.getMessage(), e);
      }
      String jsniRefString = readJsIdentifier(reader);
      if (jsniRefString == null) {
        // badly formatted identifier; skip to the next @ sign
        idx++;
View Full Code Here

        return tokStr.getString();
      } else {
        return null;
      }
    } catch (IOException e) {
      throw new InternalCompilerException(e.getMessage(), e);
    } finally {
      Context.exit();
    }
  }
View Full Code Here

  public void open() {
    try {
      this.writer = new OutputStreamWriter(new GZIPOutputStream(finalOutput),
          "UTF-8");
    } catch (UnsupportedEncodingException e) {
      throw new InternalCompilerException("UTF-8 is an unsupported encoding", e);
    } catch (IOException e) {
      throw new NestedIOException(e);
    }

    printPre();
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.InternalCompilerException$NodeInfo

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.