public class BuckJavacTask
extends com.sun.source.util.JavacTask
JavacTask with functionality that is useful for Buck:
Elements with some extended functionality
| Modifier and Type | Field and Description |
|---|---|
protected com.sun.source.util.JavacTask |
inner |
| Constructor and Description |
|---|
BuckJavacTask(com.sun.source.util.JavacTask inner) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPlugin(BuckJavacPlugin plugin,
String... args) |
void |
addPostEnterCallback(java.util.function.Consumer<Set<Element>> callback) |
void |
addTaskListener(com.sun.source.util.TaskListener taskListener) |
Iterable<? extends Element> |
analyze() |
Boolean |
call() |
Iterable<? extends Element> |
enter() |
protected void |
finished(com.sun.source.util.TaskEvent e) |
Iterable<? extends JavaFileObject> |
generate() |
ElementsExtended |
getElements() |
com.sun.source.util.Trees |
getTrees() |
TypeMirror |
getTypeMirror(Iterable<? extends com.sun.source.tree.Tree> path) |
Types |
getTypes() |
protected void |
onPostEnter(Set<Element> topLevelElements) |
Iterable<? extends com.sun.source.tree.CompilationUnitTree> |
parse() |
void |
removeTaskListener(com.sun.source.util.TaskListener taskListener) |
void |
setLocale(Locale locale) |
void |
setProcessors(Iterable<? extends Processor> processors) |
void |
setTaskListener(com.sun.source.util.TaskListener taskListener)
Sets a
TaskListener. |
protected void |
started(com.sun.source.util.TaskEvent e) |
public Iterable<? extends com.sun.source.tree.CompilationUnitTree> parse() throws IOException
IOExceptionpublic Iterable<? extends Element> enter() throws IOException
IOExceptionpublic void setTaskListener(com.sun.source.util.TaskListener taskListener)
TaskListener. Like JavacTask's implementation of this method, the
listener does not replace listeners added with addTaskListener(TaskListener). Instead,
it replaces only the listener provided in the previous call to this method, if any.
Presumably this behavior was to enable Plugins to work properly
with build systems that were written when only a single TaskListener was supported at a
time.
public void addTaskListener(com.sun.source.util.TaskListener taskListener)
public void removeTaskListener(com.sun.source.util.TaskListener taskListener)
public ElementsExtended getElements()
public void addPlugin(BuckJavacPlugin plugin, String... args)
public void addPostEnterCallback(java.util.function.Consumer<Set<Element>> callback)
public com.sun.source.util.Trees getTrees()
protected void started(com.sun.source.util.TaskEvent e)
protected void finished(com.sun.source.util.TaskEvent e)
public Iterable<? extends Element> analyze() throws IOException
analyze in class com.sun.source.util.JavacTaskIOExceptionpublic Iterable<? extends JavaFileObject> generate() throws IOException
generate in class com.sun.source.util.JavacTaskIOExceptionpublic TypeMirror getTypeMirror(Iterable<? extends com.sun.source.tree.Tree> path)
getTypeMirror in class com.sun.source.util.JavacTaskpublic Types getTypes()
getTypes in class com.sun.source.util.JavacTaskpublic void setLocale(Locale locale)
public Boolean call()