## org.plovr
Class Compilation

    java.lang.Object
      org.plovr.Compilation

    public final class Compilation

extends java.lang.Object

`Compilation` represents a compilation performed by the Closure Compiler.

Author:
  bolinfest@gmail.com (Michael Bolin)

Method Summary
`void` `appendRootModuleInfo(java.lang.Appendable appendable, boolean isDebugMode, Function<java.lang.String,java.lang.String> moduleNameToUri)`
`void` `compile(Config config)`
`static Compilation` `create(java.util.List<com.google.javascript.jscomp.JSSourceFile> externs, java.util.List<com.google.javascript.jscomp.JSSourceFile> inputs)`
`static Compilation` `createForModules(java.util.List<com.google.javascript.jscomp.JSSourceFile> externs, java.util.List<com.google.javascript.jscomp.JSModule> modules)`
`java.lang.String` `getCodeForModule(java.lang.String moduleName, boolean isDebugMode, Function<java.lang.String,java.lang.String> moduleNameToUri)`
`java.lang.String` `getCodeForRootModule(boolean isDebugMode, Function<java.lang.String,java.lang.String> moduleNameToUri)`
`java.util.List<org.plovr.CompilationError>` `getCompilationErrors()`
`java.util.List<org.plovr.CompilationError>` `getCompilationWarnings()`
`java.lang.String` `getCompiledCode()`
`java.util.List<com.google.javascript.jscomp.JSSourceFile>` `getInputs()`
`com.google.javascript.jscomp.Result` `getResult()`
`java.lang.String` `getRootModuleName()`
`java.lang.Double` `getTypedPercent()`
`boolean` `hasResult()`
`java.lang.String` `toString()`
`boolean` `usesModules()`
`void` `writeCompiledCodeToFiles(Function<java.lang.String,java.lang.String> moduleNameToUri, java.lang.String sourceMapPath)` Writes out all of the module files.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### create

    public static Compilation create(java.util.List<com.google.javascript.jscomp.JSSourceFile> externs,
                                     java.util.List<com.google.javascript.jscomp.JSSourceFile> inputs)

### createForModules

    public static Compilation createForModules(java.util.List<com.google.javascript.jscomp.JSSourceFile> externs,
                                               java.util.List<com.google.javascript.jscomp.JSModule> modules)

### compile

    public void compile(Config config)

### usesModules

    public boolean usesModules()

### hasResult

    public boolean hasResult()

### getResult

    public com.google.javascript.jscomp.Result getResult()

### getCompiledCode

    public java.lang.String getCompiledCode()

### getRootModuleName

    public java.lang.String getRootModuleName()

### getCodeForModule

    public java.lang.String getCodeForModule(java.lang.String moduleName,
                                             boolean isDebugMode,
                                             Function<java.lang.String,java.lang.String> moduleNameToUri)

### appendRootModuleInfo

    public void appendRootModuleInfo(java.lang.Appendable appendable,
                                     boolean isDebugMode,
                                     Function<java.lang.String,java.lang.String> moduleNameToUri)
                              throws java.io.IOException

  Throws:
    `java.io.IOException`

### getCodeForRootModule

    public java.lang.String getCodeForRootModule(boolean isDebugMode,
                                                 Function<java.lang.String,java.lang.String> moduleNameToUri)

### writeCompiledCodeToFiles

    public void writeCompiledCodeToFiles(Function<java.lang.String,java.lang.String> moduleNameToUri,
                                         java.lang.String sourceMapPath)
                                  throws java.io.IOException

  Writes out all of the module files. This method is only applicable when modules are used. This is expected to be used only with the build command.

  Throws:
    `java.io.IOException`

### getCompilationErrors

    public java.util.List<org.plovr.CompilationError> getCompilationErrors()

### getCompilationWarnings

    public java.util.List<org.plovr.CompilationError> getCompilationWarnings()

### getTypedPercent

    @Nullable
    public java.lang.Double getTypedPercent()

  Returns:
    null if the code was compiled in `CompilationMode.RAW` mode

### getInputs

    public java.util.List<com.google.javascript.jscomp.JSSourceFile> getInputs()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`