ErrorAPF.java revision 553
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * This code is free software; you can redistribute it and/or modify it
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * under the terms of the GNU General Public License version 2 only, as
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * published by the Free Software Foundation.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * This code is distributed in the hope that it will be useful, but WITHOUT
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * version 2 for more details (a copy is included in the LICENSE file that
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * accompanied this code).
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * You should have received a copy of the GNU General Public License version
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * 2 along with this work; if not, write to the Free Software Foundation,
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * or visit www.oracle.com if you need additional information or have any
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedyimport static com.sun.mirror.util.DeclarationVisitors.*;
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Construct a processor that does nothing but report an error.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedypublic class ErrorAPF implements AnnotationProcessorFactory {
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy static class ErrorAP implements AnnotationProcessor {
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy ErrorAP(AnnotationProcessorEnvironment env) {
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy public void process() {
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy messager.printError("It's a mad, mad, mad, mad world");
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy messager.printError("Something wicked this way comes");
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy for(TypeDeclaration typeDecl : env.getSpecifiedTypeDeclarations())
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy messager.printError(typeDecl.getPosition(), "Boring class name");
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy supportedTypes = unmodifiableCollection(Arrays.asList(types));
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy static Collection<String> supportedOptions;
return supportedOptions;
return supportedTypes;