test/tools/javac/processing/model/util/deprecation/TestDeprecation.java

changeset 699
d2aaaec153e8
parent 575
9a7c998bf2fc
child 1013
8eb952f43b11
equal deleted inserted replaced
698:f94af0667151 699:d2aaaec153e8
1 /* 1 /*
2 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2006, 2010 Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
24 /* 24 /*
25 * @test 25 * @test
26 * @bug 6392818 26 * @bug 6392818
27 * @summary Tests Elements.isDeprecated(Element) 27 * @summary Tests Elements.isDeprecated(Element)
28 * @author Joseph D. Darcy 28 * @author Joseph D. Darcy
29 * @library ../../../../lib
30 * @build JavacTestingAbstractProcessor
29 * @compile TestDeprecation.java 31 * @compile TestDeprecation.java
30 * @compile -processor TestDeprecation -proc:only Dep1.java 32 * @compile -processor TestDeprecation -proc:only Dep1.java
31 * @compile Dep1.java 33 * @compile Dep1.java
32 * @compile -processor TestDeprecation -proc:only Dep1 TestDeprecation.java 34 * @compile -processor TestDeprecation -proc:only Dep1 TestDeprecation.java
33 */ 35 */
45 /** 47 /**
46 * This processor verifies that the information returned by 48 * This processor verifies that the information returned by
47 * getElementsAnnotatedWith is consistent with the expected results 49 * getElementsAnnotatedWith is consistent with the expected results
48 * stored in an AnnotatedElementInfo annotation. 50 * stored in an AnnotatedElementInfo annotation.
49 */ 51 */
50 @SupportedAnnotationTypes("*") 52 public class TestDeprecation extends JavacTestingAbstractProcessor {
51 public class TestDeprecation extends AbstractProcessor {
52 53
53 public boolean process(Set<? extends TypeElement> annotations, 54 public boolean process(Set<? extends TypeElement> annotations,
54 RoundEnvironment roundEnv) { 55 RoundEnvironment roundEnv) {
55 boolean failure = false; 56 boolean failure = false;
56 if (!roundEnv.processingOver()) { 57 if (!roundEnv.processingOver()) {
96 } 97 }
97 super.scan(e, p); 98 super.scan(e, p);
98 return failure; 99 return failure;
99 } 100 }
100 } 101 }
101
102 @Override
103 public SourceVersion getSupportedSourceVersion() {
104 return SourceVersion.latest();
105 }
106 } 102 }

mercurial