equal
deleted
inserted
replaced
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. |
27 import javax.annotation.processing.*; |
27 import javax.annotation.processing.*; |
28 import javax.lang.model.*; |
28 import javax.lang.model.*; |
29 import javax.lang.model.element.*; |
29 import javax.lang.model.element.*; |
30 import javax.tools.*; |
30 import javax.tools.*; |
31 |
31 |
32 @SupportedAnnotationTypes("*") |
32 @SuppressWarnings("") |
33 public class A extends AbstractProcessor { |
33 public class A extends JavacTestingAbstractProcessor { |
34 |
|
35 public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { |
34 public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { |
36 Messager m = processingEnv.getMessager(); |
35 Messager m = processingEnv.getMessager(); |
37 for (TypeElement anno: annotations) { |
36 for (TypeElement anno: annotations) { |
38 for (Element e: roundEnv.getElementsAnnotatedWith(anno)) |
37 for (Element e: roundEnv.getElementsAnnotatedWith(anno)) |
39 m.printMessage(Diagnostic.Kind.ERROR, "test", e); |
38 m.printMessage(Diagnostic.Kind.ERROR, "test", e); |
40 |
39 |
41 } |
40 } |
42 return true; |
41 return true; |
43 } |
42 } |
44 |
43 |
45 @Override |
44 @SuppressWarnings("") |
46 public SourceVersion getSupportedSourceVersion() { |
45 private void foo() {} |
47 return SourceVersion.latest(); |
|
48 } |
|
49 } |
46 } |