--- a/langtools/make/tools/crules/CodingRulesAnalyzerPlugin.java Tue Aug 26 12:45:28 2014 +0100
+++ b/langtools/make/tools/crules/CodingRulesAnalyzerPlugin.java Wed Aug 27 07:44:00 2014 +0200
@@ -41,6 +41,8 @@
import com.sun.tools.javac.api.BasicJavacTask;
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
import com.sun.tools.javac.util.Log;
public class CodingRulesAnalyzerPlugin implements Plugin {
@@ -48,6 +50,7 @@
protected Log log;
protected Trees trees;
+ @DefinedBy(Api.COMPILER_TREE)
public void init(JavacTask task, String... args) {
BasicJavacTask impl = (BasicJavacTask)task;
Context context = impl.getContext();
@@ -55,7 +58,8 @@
trees = Trees.instance(task);
task.addTaskListener(new PostAnalyzeTaskListener(
new MutableFieldsAnalyzer(task),
- new AssertCheckAnalyzer(task)
+ new AssertCheckAnalyzer(task),
+ new DefinedByAnalyzer(task)
));
}
@@ -74,10 +78,10 @@
}
}
- @Override
+ @Override @DefinedBy(Api.COMPILER_TREE)
public void started(TaskEvent taskEvent) {}
- @Override
+ @Override @DefinedBy(Api.COMPILER_TREE)
public void finished(TaskEvent taskEvent) {
List<AbstractCodingRulesAnalyzer> currentAnalyzers = this.analyzers.get(taskEvent.getKind());
@@ -99,7 +103,7 @@
}
}
- @Override
+ @Override @DefinedBy(Api.COMPILER_TREE)
public String getName() {
return "coding_rules";
}