org.plovr
Class Config.Builder

java.lang.Object
  extended by org.plovr.Config.Builder
Enclosing class:
Config

public static final class Config.Builder
extends Object


Method Summary
 void addBuiltInExtern(String builtInExtern)
           
 void addDefine(String name, JsonPrimitive primitive)
           
 void addExtern(String extern)
           
 void addInput(File file, String name)
           
 void addInputByName(String name)
           
 void addPath(String path)
           
 void addSoyFunctionPlugin(String qualifiedName)
          Adds a soy plugin module.
 void addTestExcludePath(File testExcludePath)
           
 Config build()
           
 ListMultimap<CustomPassExecutionTime,CompilerPassFactory> getCustomPasses()
           
 JsonObject getExperimentalCompilerOptions()
           
 org.plovr.ModuleConfig.Builder getModuleConfigBuilder()
           
 File getRelativePathBase()
          Directory against which relative paths should be resolved.
 void resetChecks()
           
 void resetCustomPasses()
           
 void resetDefines()
           
 void resetExperimentalCompilerOptions()
           
 void resetExterns()
           
 void resetIdGenerators()
           
 void resetInputs()
           
 void resetModuleConfigBuilder()
           
 void resetPaths()
           
 void resetSoyFunctionPlugins()
           
 void resetStripNameSuffixes()
           
 void resetStripTypePrefixes()
           
 void resetTestExcludePaths()
           
 void setAmbiguateProperties(boolean ambiguateProperties)
           
 void setCheckLevelsForDiagnosticGroups(Map<String,CheckLevel> groups)
          Each key in groups should correspond to a DiagnosticGroup; however, a key cannot map to a DiagnosticGroup yet because custom compiler passes may add their own entries to the PlovrDiagnosticGroups collection, which is not populated until the CompilerOptions are created.
 void setCompilationMode(CompilationMode mode)
           
 void setConfigFile(File configFile)
           
 void setCustomExternsOnly(boolean customExternsOnly)
           
 void setCustomPasses(ListMultimap<CustomPassExecutionTime,CompilerPassFactory> customPasses)
           
 void setDebugOptions(boolean debug)
           
 void setDisambiguateProperties(boolean disambiguateProperties)
           
 void setDocumentationOutputDirectory(File documentationOutputDirectory)
           
 void setExcludeClosureLibrary(boolean excludeClosureLibrary)
           
 void setExperimentalCompilerOptions(JsonObject experimentalCompilerOptions)
           
 void setExportTestFunctions(boolean exportTestFunctions)
           
 void setFingerprintJsFiles(boolean fingerprint)
           
 void setGlobalScopeName(String scope)
           
 void setId(String id)
           
 void setIdGenerators(Set<String> idGenerators)
           
 void setOutputCharset(Charset outputCharset)
           
 void setOutputFile(File outputFile)
           
 void setOutputWrapper(String outputWrapper)
           
 void setPathToClosureLibrary(String pathToClosureLibrary)
           
 void setPrettyPrint(boolean prettyPrint)
           
 void setPrintInputDelimiter(boolean printInputDelimiter)
           
 void setPropertyMapInputFile(File file)
           
 void setPropertyMapOutputFile(File file)
           
 void setStripNameSuffixes(Set<String> stripNameSuffixes)
           
 void setStripTypePrefixes(Set<String> stripTypePrefixes)
           
 void setTestTemplate(File testTemplate)
           
 void setTreatWarningsAsErrors(boolean treatWarningsAsErrors)
           
 void setVariableMapInputFile(File file)
           
 void setVariableMapOutputFile(File file)
           
 void setWarningLevel(WarningLevel level)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRelativePathBase

public File getRelativePathBase()
Directory against which relative paths should be resolved.


setId

public void setId(String id)

addPath

public void addPath(String path)

resetPaths

public void resetPaths()

addInput

public void addInput(File file,
                     String name)

addInputByName

public void addInputByName(String name)

resetInputs

public void resetInputs()

addExtern

public void addExtern(String extern)

addBuiltInExtern

public void addBuiltInExtern(String builtInExtern)
Parameters:
builtInExtern - should be of the form "//chrome_extensions.js"

resetExterns

public void resetExterns()

setCustomExternsOnly

public void setCustomExternsOnly(boolean customExternsOnly)

setPathToClosureLibrary

public void setPathToClosureLibrary(String pathToClosureLibrary)

setExcludeClosureLibrary

public void setExcludeClosureLibrary(boolean excludeClosureLibrary)

setConfigFile

public void setConfigFile(File configFile)

getModuleConfigBuilder

public org.plovr.ModuleConfig.Builder getModuleConfigBuilder()

resetModuleConfigBuilder

public void resetModuleConfigBuilder()

setTestTemplate

public void setTestTemplate(File testTemplate)

addTestExcludePath

public void addTestExcludePath(File testExcludePath)

resetTestExcludePaths

public void resetTestExcludePaths()

addSoyFunctionPlugin

public void addSoyFunctionPlugin(String qualifiedName)
Adds a soy plugin module.
   addSoyFunctionPlugin("org.plovr.soy.function.PlovrModule")
 

Parameters:
qualifiedName - the module class name

resetSoyFunctionPlugins

public void resetSoyFunctionPlugins()

setDocumentationOutputDirectory

public void setDocumentationOutputDirectory(File documentationOutputDirectory)

setCustomPasses

public void setCustomPasses(ListMultimap<CustomPassExecutionTime,CompilerPassFactory> customPasses)

resetCustomPasses

public void resetCustomPasses()

getCustomPasses

public ListMultimap<CustomPassExecutionTime,CompilerPassFactory> getCustomPasses()
Returns:
an immutable ListMultimap

setCompilationMode

public void setCompilationMode(CompilationMode mode)

setWarningLevel

public void setWarningLevel(WarningLevel level)

setDebugOptions

public void setDebugOptions(boolean debug)

setPrettyPrint

public void setPrettyPrint(boolean prettyPrint)

setPrintInputDelimiter

public void setPrintInputDelimiter(boolean printInputDelimiter)

setOutputFile

public void setOutputFile(File outputFile)

setOutputWrapper

public void setOutputWrapper(String outputWrapper)

setOutputCharset

public void setOutputCharset(Charset outputCharset)

setFingerprintJsFiles

public void setFingerprintJsFiles(boolean fingerprint)

setCheckLevelsForDiagnosticGroups

public void setCheckLevelsForDiagnosticGroups(Map<String,CheckLevel> groups)
Each key in groups should correspond to a DiagnosticGroup; however, a key cannot map to a DiagnosticGroup yet because custom compiler passes may add their own entries to the PlovrDiagnosticGroups collection, which is not populated until the CompilerOptions are created.

Parameters:
groups -

resetChecks

public void resetChecks()

setExportTestFunctions

public void setExportTestFunctions(boolean exportTestFunctions)

setTreatWarningsAsErrors

public void setTreatWarningsAsErrors(boolean treatWarningsAsErrors)

addDefine

public void addDefine(String name,
                      JsonPrimitive primitive)

resetDefines

public void resetDefines()

setStripNameSuffixes

public void setStripNameSuffixes(Set<String> stripNameSuffixes)

resetStripNameSuffixes

public void resetStripNameSuffixes()

setStripTypePrefixes

public void setStripTypePrefixes(Set<String> stripTypePrefixes)

resetStripTypePrefixes

public void resetStripTypePrefixes()

setIdGenerators

public void setIdGenerators(Set<String> idGenerators)

resetIdGenerators

public void resetIdGenerators()

setAmbiguateProperties

public void setAmbiguateProperties(boolean ambiguateProperties)

setDisambiguateProperties

public void setDisambiguateProperties(boolean disambiguateProperties)

setExperimentalCompilerOptions

public void setExperimentalCompilerOptions(JsonObject experimentalCompilerOptions)

getExperimentalCompilerOptions

public JsonObject getExperimentalCompilerOptions()

resetExperimentalCompilerOptions

public void resetExperimentalCompilerOptions()

setGlobalScopeName

public void setGlobalScopeName(String scope)

setVariableMapInputFile

public void setVariableMapInputFile(File file)

setVariableMapOutputFile

public void setVariableMapOutputFile(File file)

setPropertyMapInputFile

public void setPropertyMapInputFile(File file)

setPropertyMapOutputFile

public void setPropertyMapOutputFile(File file)

build

public Config build()