public class FrontendOnlyJavacTask extends BuckJavacTask
JavacTask
that implements only the frontend portions of the task,
using only the parse phase of the underlying compiler and without requiring a complete classpath.
This effectively does the same thing as the Enter phase of the compiler (see
http://openjdk.java.net/groups/compiler/doc/compilation-overview/index.html), but applying
heuristics when dependencies are missing. This necessarily requires some assumptions to be made
about references to symbols defined in those dependencies. See the documentation of com.facebook.buck.jvm.java.abi.source
for details.Modifier and Type | Field and Description |
---|---|
protected com.sun.source.util.JavacTask |
inner |
Constructor and Description |
---|
FrontendOnlyJavacTask(com.sun.source.util.JavacTask task) |
Modifier and Type | Method and Description |
---|---|
Iterable<? extends Element> |
analyze() |
Boolean |
call() |
Iterable<? extends Element> |
enter() |
Iterable<? extends JavaFileObject> |
generate() |
com.facebook.buck.jvm.java.abi.source.TreeBackedElements |
getElements() |
com.facebook.buck.jvm.java.abi.source.TreeBackedTrees |
getTrees() |
TypeMirror |
getTypeMirror(Iterable<? extends com.sun.source.tree.Tree> path) |
com.facebook.buck.jvm.java.abi.source.TreeBackedTypes |
getTypes() |
protected void |
onPostEnter(Set<Element> topLevelElements) |
Iterable<? extends com.sun.source.tree.CompilationUnitTree> |
parse() |
void |
setLocale(Locale locale) |
void |
setProcessors(Iterable<? extends Processor> processors) |
addPlugin, addPostEnterCallback, addTaskListener, finished, removeTaskListener, setTaskListener, started
public FrontendOnlyJavacTask(com.sun.source.util.JavacTask task)
public Iterable<? extends com.sun.source.tree.CompilationUnitTree> parse() throws IOException
parse
in class BuckJavacTask
IOException
public Iterable<? extends Element> enter() throws IOException
enter
in class BuckJavacTask
IOException
public Iterable<? extends JavaFileObject> generate()
public TypeMirror getTypeMirror(Iterable<? extends com.sun.source.tree.Tree> path)
public com.facebook.buck.jvm.java.abi.source.TreeBackedElements getElements()
getElements
in class BuckJavacTask
public com.facebook.buck.jvm.java.abi.source.TreeBackedTrees getTrees()
getTrees
in class BuckJavacTask
public com.facebook.buck.jvm.java.abi.source.TreeBackedTypes getTypes()
public void setProcessors(Iterable<? extends Processor> processors)
setProcessors
in interface JavaCompiler.CompilationTask
public void setLocale(Locale locale)
setLocale
in interface JavaCompiler.CompilationTask
public Boolean call()
call
in interface Callable<Boolean>
call
in interface JavaCompiler.CompilationTask
protected void onPostEnter(Set<Element> topLevelElements)
onPostEnter
in class BuckJavacTask