test/tools/javac/processing/model/type/MirroredTypeEx/Plurality.java
Print this page
*** 23,32 ****
--- 23,34 ----
/*
* @test
* @bug 6519115
* @summary Verify MirroredTypeException vs MirroredTypesException is thrown
+ * @library ../../../../lib
+ * @build JavacTestingAbstractProcessor
* @compile Plurality.java
* @compile -processor Plurality -proc:only Plurality.java
* @author Joseph D. Darcy
*/
import java.lang.annotation.*;
*** 36,64 ****
import javax.lang.model.*;
import javax.lang.model.element.*;
import javax.lang.model.type.*;
import javax.lang.model.util.*;
- @SupportedAnnotationTypes("*")
@P0
@P1
@P2
@S1
! public class Plurality extends AbstractProcessor {
private boolean executed = false;
- Elements elements;
- Types types;
-
- @Override
- public void init(ProcessingEnvironment penv) {
- super.init(penv);
- elements = penv.getElementUtils();
- types = penv.getTypeUtils();
- }
-
-
public boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) {
if (!roundEnv.processingOver()) {
executed = true;
// Processing just this type
--- 38,54 ----
import javax.lang.model.*;
import javax.lang.model.element.*;
import javax.lang.model.type.*;
import javax.lang.model.util.*;
@P0
@P1
@P2
@S1
! public class Plurality extends JavacTestingAbstractProcessor {
private boolean executed = false;
public boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) {
if (!roundEnv.processingOver()) {
executed = true;
// Processing just this type
*** 162,176 ****
throw new RuntimeException("Mismatched names: " +
canonicalName + "\t" +
toStringName);
}
}
-
- @Override
- public SourceVersion getSupportedSourceVersion() {
- return SourceVersion.latest();
- }
}
@Retention(RetentionPolicy.RUNTIME)
@interface P0 {
Class[] value() default {};
--- 152,161 ----