public enum CompilationLevel extends Enum<CompilationLevel>
Enum Constant and Description |
---|
ADVANCED_OPTIMIZATIONS
ADVANCED_OPTIMIZATIONS aggressively reduces code size by renaming function
names and variables, removing code which is never called, etc.
|
SIMPLE_OPTIMIZATIONS
SIMPLE_OPTIMIZATIONS performs transformations to the input JS that do not
require any changes to JS that depend on the input JS.
|
WHITESPACE_ONLY
WHITESPACE_ONLY removes comments and extra whitespace in the input JS.
|
Modifier and Type | Method and Description |
---|---|
void |
setDebugOptionsForCompilationLevel(CompilerOptions options) |
void |
setOptionsForCompilationLevel(CompilerOptions options) |
void |
setTypeBasedOptimizationOptions(CompilerOptions options)
Enable additional optimizations that use type information.
|
void |
setWrappedOutputOptimizations(CompilerOptions options)
Enable additional optimizations that operate on global declarations.
|
static CompilationLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CompilationLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CompilationLevel WHITESPACE_ONLY
public static final CompilationLevel SIMPLE_OPTIMIZATIONS
public static final CompilationLevel ADVANCED_OPTIMIZATIONS
public static CompilationLevel[] values()
for (CompilationLevel c : CompilationLevel.values()) System.out.println(c);
public static CompilationLevel valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic void setOptionsForCompilationLevel(CompilerOptions options)
public void setDebugOptionsForCompilationLevel(CompilerOptions options)
public void setTypeBasedOptimizationOptions(CompilerOptions options)
options
- The CompilerOptions object to set the options on.public void setWrappedOutputOptimizations(CompilerOptions options)
options
- The CompilerOptions object to set the options on.Copyright © 2009-2016 Google. All Rights Reserved.