本文整理汇总了Java中com.google.javascript.jscomp.CompilationLevel.SIMPLE_OPTIMIZATIONS属性的典型用法代码示例。如果您正苦于以下问题:Java CompilationLevel.SIMPLE_OPTIMIZATIONS属性的具体用法?Java CompilationLevel.SIMPLE_OPTIMIZATIONS怎么用?Java CompilationLevel.SIMPLE_OPTIMIZATIONS使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.google.javascript.jscomp.CompilationLevel
的用法示例。
在下文中一共展示了CompilationLevel.SIMPLE_OPTIMIZATIONS属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: GccMinifier
public GccMinifier(MinifyBuilder builder, IFile srcFile, IFile destFile,
OutputStream out, IEclipsePreferences prefs)
throws IOException, CoreException {
super(builder);
this.srcFile = srcFile;
this.out = out;
this.outCharset = destFile.exists() ? destFile.getCharset() : "ascii";
console = builder.minifierConsole();
String optLevel = prefs.get(PrefsAccess.preferenceKey(
srcFile, MinifyBuilder.GCC_OPTIMIZATION),
MinifyBuilder.GCC_OPT_WHITESPACE_ONLY);
switch (optLevel) {
case MinifyBuilder.GCC_OPT_ADVANCED:
compilationLevel = CompilationLevel.ADVANCED_OPTIMIZATIONS;
break;
case MinifyBuilder.GCC_OPT_SIMPLE:
compilationLevel = CompilationLevel.SIMPLE_OPTIMIZATIONS;
break;
default:
compilationLevel = CompilationLevel.WHITESPACE_ONLY;
}
}
示例2: CompileTask
public CompileTask() {
this.languageIn = CompilerOptions.LanguageMode.ECMASCRIPT3;
this.warningLevel = WarningLevel.DEFAULT;
this.debugOptions = false;
this.compilationLevel = CompilationLevel.SIMPLE_OPTIMIZATIONS;
this.customExternsOnly = false;
this.manageDependencies = false;
this.prettyPrint = false;
this.printInputDelimiter = false;
this.generateExports = false;
this.replaceProperties = false;
this.forceRecompile = false;
this.replacePropertiesPrefix = "closure.define.";
this.defineParams = Lists.newLinkedList();
this.externFileLists = Lists.newLinkedList();
this.sourceFileLists = Lists.newLinkedList();
this.sourcePaths = Lists.newLinkedList();
this.warnings = Lists.newLinkedList();
}
示例3: CompileTask
public CompileTask() {
this.languageIn = CompilerOptions.LanguageMode.ECMASCRIPT_2015;
this.languageOut = CompilerOptions.LanguageMode.ECMASCRIPT3;
this.warningLevel = WarningLevel.DEFAULT;
this.debugOptions = false;
this.compilationLevel = CompilationLevel.SIMPLE_OPTIMIZATIONS;
this.environment = CompilerOptions.Environment.BROWSER;
this.manageDependencies = false;
this.prettyPrint = false;
this.printInputDelimiter = false;
this.preferSingleQuotes = false;
this.generateExports = false;
this.replaceProperties = false;
this.forceRecompile = false;
this.angularPass = false;
this.replacePropertiesPrefix = "closure.define.";
this.defineParams = new ArrayList<>();
this.entryPointParams = new ArrayList<>();
this.externFileLists = new ArrayList<>();
this.sourceFileLists = new ArrayList<>();
this.sourcePaths = new ArrayList<>();
this.warnings = new ArrayList<>();
}
示例4: CompileTask
public CompileTask() {
this.languageIn = CompilerOptions.LanguageMode.ECMASCRIPT3;
this.warningLevel = WarningLevel.DEFAULT;
this.debugOptions = false;
this.compilationLevel = CompilationLevel.SIMPLE_OPTIMIZATIONS;
this.customExternsOnly = false;
this.manageDependencies = false;
this.prettyPrint = false;
this.printInputDelimiter = false;
this.generateExports = false;
this.replaceProperties = false;
this.forceRecompile = false;
this.replacePropertiesPrefix = "closure.define.";
this.defineParams = Lists.newLinkedList();
this.entryPointParams = Lists.newLinkedList();
this.externFileLists = Lists.newLinkedList();
this.sourceFileLists = Lists.newLinkedList();
this.sourcePaths = Lists.newLinkedList();
this.warnings = Lists.newLinkedList();
}
示例5: CompileTask
public CompileTask() {
this.warningLevel = WarningLevel.DEFAULT;
this.debugOptions = false;
this.compilationLevel = CompilationLevel.SIMPLE_OPTIMIZATIONS;
this.customExternsOnly = false;
this.externFileLists = Lists.newLinkedList();
this.sourceFileLists = Lists.newLinkedList();
}
示例6: setCompilationLevel
/**
* Set the compilation level.
* @param value The optimization level by string name.
* (whitespace, simple, advanced).
*/
public void setCompilationLevel(String value) {
if ("simple".equalsIgnoreCase(value)) {
this.compilationLevel = CompilationLevel.SIMPLE_OPTIMIZATIONS;
} else if ("advanced".equalsIgnoreCase(value)) {
this.compilationLevel = CompilationLevel.ADVANCED_OPTIMIZATIONS;
} else if ("whitespace".equalsIgnoreCase(value)) {
this.compilationLevel = CompilationLevel.WHITESPACE_ONLY;
} else {
throw new BuildException(
"Unrecognized 'compilation' option value (" + value + ")");
}
}
示例7: CompileTask
public CompileTask() {
this.warningLevel = WarningLevel.DEFAULT;
this.debugOptions = false;
this.compilationLevel = CompilationLevel.SIMPLE_OPTIMIZATIONS;
this.customExternsOnly = false;
this.manageDependencies = false;
this.externFileLists = Lists.newLinkedList();
this.sourceFileLists = Lists.newLinkedList();
}
示例8: ConfiguredGoogleClosureJavaScriptCompressor
public ConfiguredGoogleClosureJavaScriptCompressor() {
super(CompilationLevel.SIMPLE_OPTIMIZATIONS);
}