test/tools/javac/processing/model/element/TestNames.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2006, 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.
--- 1,7 ----
/*
! * 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,34 ****
/*
* @test
* @bug 6380016
* @summary Test that the constraints guaranteed by the Filer and maintained
* @author Joseph D. Darcy
! * @build TestNames
* @compile -processor TestNames -proc:only TestNames.java
*/
import java.util.Set;
import javax.annotation.processing.*;
--- 24,35 ----
/*
* @test
* @bug 6380016
* @summary Test that the constraints guaranteed by the Filer and maintained
* @author Joseph D. Darcy
! * @library ../../../lib
! * @build JavacTestingAbstractProcessor TestNames
* @compile -processor TestNames -proc:only TestNames.java
*/
import java.util.Set;
import javax.annotation.processing.*;
*** 43,57 ****
import java.io.*;
/**
* Basic tests of semantics of javax.lang.model.element.Name
*/
! @SupportedAnnotationTypes("*")
! public class TestNames extends AbstractProcessor {
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,
--- 44,55 ----
import java.io.*;
/**
* Basic tests of semantics of javax.lang.model.element.Name
*/
! public class TestNames extends JavacTestingAbstractProcessor {
private int round = 0;
String stringStringName = "java.lang.String";
Name stringName = null;
public boolean process(Set<? extends TypeElement> annotations,
*** 104,123 ****
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;
--- 102,111 ----