test/tools/javac/processing/6511613/DummyProcessor.java

Tue, 23 Feb 2010 18:43:02 -0800

author
jjg
date
Tue, 23 Feb 2010 18:43:02 -0800
changeset 504
6eca0895a644
child 554
9d9f26857129
permissions
-rw-r--r--

6511613: javac unexpectedly doesn't fail in some cases if an annotation processor specified
Reviewed-by: darcy

jjg@504 1 /*
jjg@504 2 * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved.
jjg@504 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jjg@504 4 *
jjg@504 5 * This code is free software; you can redistribute it and/or modify it
jjg@504 6 * under the terms of the GNU General Public License version 2 only, as
jjg@504 7 * published by the Free Software Foundation.
jjg@504 8 *
jjg@504 9 * This code is distributed in the hope that it will be useful, but WITHOUT
jjg@504 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jjg@504 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jjg@504 12 * version 2 for more details (a copy is included in the LICENSE file that
jjg@504 13 * accompanied this code).
jjg@504 14 *
jjg@504 15 * You should have received a copy of the GNU General Public License version
jjg@504 16 * 2 along with this work; if not, write to the Free Software Foundation,
jjg@504 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jjg@504 18 *
jjg@504 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
jjg@504 20 * CA 95054 USA or visit www.sun.com if you need additional information or
jjg@504 21 * have any questions.
jjg@504 22 */
jjg@504 23
jjg@504 24 import javax.annotation.processing.*;
jjg@504 25 import javax.lang.model.*;
jjg@504 26 import javax.lang.model.element.*;
jjg@504 27 import java.util.Set;
jjg@504 28
jjg@504 29 @SupportedAnnotationTypes("*")
jjg@504 30 public class DummyProcessor extends AbstractProcessor {
jjg@504 31 public boolean process(Set<? extends TypeElement> annotations,
jjg@504 32 RoundEnvironment roundEnv) {
jjg@504 33 return true;
jjg@504 34 }
jjg@504 35 @Override
jjg@504 36 public SourceVersion getSupportedSourceVersion() {
jjg@504 37 return SourceVersion.latest();
jjg@504 38 }
jjg@504 39 }
jjg@504 40

mercurial