test/tools/javac/processing/model/element/TestNames.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,11 +24,12 @@
/*
* @test
* @bug 6380016
* @summary Test that the constraints guaranteed by the Filer and maintained
* @author Joseph D. Darcy
- * @build TestNames
+ * @library ../../../lib
+ * @build JavacTestingAbstractProcessor TestNames
* @compile -processor TestNames -proc:only TestNames.java
*/
import java.util.Set;
import javax.annotation.processing.*;
@@ -43,15 +44,12 @@
import java.io.*;
/**
* Basic tests of semantics of javax.lang.model.element.Name
*/
-@SupportedAnnotationTypes("*")
-public class TestNames extends AbstractProcessor {
+public class TestNames extends JavacTestingAbstractProcessor {
private int round = 0;
- private Filer filer;
- private Elements eltUtils;
String stringStringName = "java.lang.String";
Name stringName = null;
public boolean process(Set<? extends TypeElement> annotations,
@@ -104,20 +102,10 @@
throw new RuntimeException("Invalid name equality checks.");
}
return true;
}
- public SourceVersion getSupportedSourceVersion() {
- return SourceVersion.latest();
- }
-
- public void init(ProcessingEnvironment processingEnv) {
- super.init(processingEnv);
- filer = processingEnv.getFiler();
- eltUtils = processingEnv.getElementUtils();
- }
-
private static class Pseudonym implements Name {
private String name;
private Pseudonym(String name) {
this.name = name;