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()) { |