public class JdtCompiler extends Object
CompilationUnit
s.Modifier and Type | Class and Description |
---|---|
static interface |
JdtCompiler.AdditionalTypeProviderDelegate
Provides hooks for changing the behavior of the JdtCompiler when unknown
types are encountered during compilation.
|
static class |
JdtCompiler.DefaultUnitProcessor
A default processor that simply collects build units.
|
static class |
JdtCompiler.JreIndex
Static cache of all the JRE package names.
|
static interface |
JdtCompiler.UnitProcessor
Interface for processing units on the fly during compilation.
|
Constructor and Description |
---|
JdtCompiler(CompilerContext compilerContext,
JdtCompiler.UnitProcessor processor) |
Modifier and Type | Method and Description |
---|---|
void |
addCompiledUnit(CompilationUnit unit) |
ArrayList<String> |
collectApiRefs(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud) |
static List<CompilationUnit> |
compile(TreeLogger logger,
CompilerContext compilerContext,
Collection<CompilationUnitBuilder> builders)
Compiles the given set of units.
|
void |
doCompile(TreeLogger logger,
Collection<CompilationUnitBuilder> builders)
Compiles source using the JDT.
|
org.eclipse.jdt.internal.compiler.impl.CompilerOptions |
getCompilerOptions() |
static org.eclipse.jdt.internal.compiler.impl.CompilerOptions |
getStandardCompilerOptions() |
org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding |
resolveType(String sourceOrBinaryName) |
void |
setAdditionalTypeProviderDelegate(JdtCompiler.AdditionalTypeProviderDelegate newDelegate) |
static void |
setRemoveGwtIncompatible(boolean remove)
Sets whether the compiler should remove GwtIncompatible annotated classes amd members.
|
static void |
setRemoveUnusedImports(boolean remove)
Sets whether the compiler should remove unused imports.
|
public JdtCompiler(CompilerContext compilerContext, JdtCompiler.UnitProcessor processor)
public static List<CompilationUnit> compile(TreeLogger logger, CompilerContext compilerContext, Collection<CompilationUnitBuilder> builders) throws UnableToCompleteException
UnableToCompleteException
public static org.eclipse.jdt.internal.compiler.impl.CompilerOptions getStandardCompilerOptions()
public org.eclipse.jdt.internal.compiler.impl.CompilerOptions getCompilerOptions()
public void addCompiledUnit(CompilationUnit unit)
public ArrayList<String> collectApiRefs(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud)
public void doCompile(TreeLogger logger, Collection<CompilationUnitBuilder> builders) throws UnableToCompleteException
JdtCompiler.UnitProcessor.process(com.google.gwt.dev.javac.CompilationUnitBuilder, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration, java.util.List<com.google.gwt.dev.javac.CompiledClass>)
callback method will be called
once for each compiled file. If the compiler aborts, logs a message and throws
UnableToCompleteException.UnableToCompleteException
public org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding resolveType(String sourceOrBinaryName)
public void setAdditionalTypeProviderDelegate(JdtCompiler.AdditionalTypeProviderDelegate newDelegate)
public static void setRemoveGwtIncompatible(boolean remove)
public static void setRemoveUnusedImports(boolean remove)
Copyright © 2018. All rights reserved.