test/tools/javac/processing/filer/TestFilerConstraints.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -24,10 +24,11 @@
/*
* @test
* @bug 6380018 6453386 6457283
* @summary Test that the constraints guaranteed by the Filer and maintained
* @author Joseph D. Darcy
+ * @library ../../lib
* @build TestFilerConstraints
* @compile -encoding iso-8859-1 -processor TestFilerConstraints -proc:only TestFilerConstraints.java
*/
import java.util.Set;
@@ -67,15 +68,12 @@
* <li> Calling close multiple times does not re-register the file for
* processing.
*
* </ul>
*/
-@SupportedAnnotationTypes("*")
-public class TestFilerConstraints extends AbstractProcessor {
+public class TestFilerConstraints extends JavacTestingAbstractProcessor {
private int round = 0;
- private Messager messager;
- private Filer filer;
private PrintWriter pw_src1 = null;
private PrintWriter pw_src2 = null;
private OutputStream os_classFile1 = null;
private Writer pw_classFile2 = null;
@@ -165,21 +163,10 @@
}
return true;
}
- public SourceVersion getSupportedSourceVersion() {
- return SourceVersion.latest();
- }
-
- public void init(ProcessingEnvironment processingEnv) {
- super.init(processingEnv);
- messager = processingEnv.getMessager();
- filer = processingEnv.getFiler();
-
- }
-
/**
* Test that the single expected expected type, name, is the root
* element.
*/
private void testExpectedType(RoundEnvironment roundEnv, String name) {