Package com.google.gwt.dev

Examples of com.google.gwt.dev.PermutationResult


  /**
   * Gets or creates a CompilationResult for the given JavaScript program.
   */
  public StandardCompilationResult getCompilation(TreeLogger logger,
      File resultFile) throws UnableToCompleteException {
    PermutationResult permutationResult;
    try {
      permutationResult = Util.readFileAsObject(resultFile,
          PermutationResult.class);
    } catch (ClassNotFoundException e) {
      logger.log(TreeLogger.ERROR, "Unable to instantiate PermutationResult", e);
      throw new UnableToCompleteException();
    }

    if (permutationResult == null) {
      logger.log(TreeLogger.ERROR, "Unable to read PermutationResult");
      throw new UnableToCompleteException();
    }

    String strongName = Util.computeStrongName(Util.getBytes(permutationResult.getJs()));
    StandardCompilationResult result = resultsByStrongName.get(strongName);
    if (result == null) {
      result = new StandardCompilationResult(permutationResult.getJs(),
          strongName, resultFile);
      resultsByStrongName.put(result.getStrongName(), result);
      artifacts.add(result);
    }
    return result;
View Full Code Here


    String toReturn = null;
    if (js != null) {
      toReturn = js.get();
    }
    if (toReturn == null) {
      PermutationResult result;
      try {
        result = Util.readFileAsObject(resultFile, PermutationResult.class);
      } catch (ClassNotFoundException e) {
        throw new RuntimeException(
            "Unexpectedly unable to read PermutationResult '"
                + resultFile.getAbsolutePath() + "'", e);
      }
      if (result == null) {
        throw new RuntimeException(
            "Unexpectedly unable to read PermutationResult '"
                + resultFile.getAbsolutePath() + "'");
      }
      toReturn = result.getJs();
      js = new SoftReference<String>(toReturn);
    }
    return toReturn;
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.PermutationResult

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.