src/share/classes/com/sun/tools/apt/comp/BootstrapAPF.java

Thu, 04 Feb 2010 10:14:28 -0800

author
jjg
date
Thu, 04 Feb 2010 10:14:28 -0800
changeset 489
4b4e282a3146
parent 331
d043adadc8b6
child 554
9d9f26857129
permissions
-rw-r--r--

6923080: TreeScanner.visitNewClass should scan tree.typeargs
Reviewed-by: darcy

     1 /*
     2  * Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     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
     7  * published by the Free Software Foundation.  Sun designates this
     8  * particular file as subject to the "Classpath" exception as provided
     9  * by Sun in the LICENSE file that accompanied this code.
    10  *
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14  * version 2 for more details (a copy is included in the LICENSE file that
    15  * accompanied this code).
    16  *
    17  * You should have received a copy of the GNU General Public License version
    18  * 2 along with this work; if not, write to the Free Software Foundation,
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20  *
    21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    22  * CA 95054 USA or visit www.sun.com if you need additional information or
    23  * have any questions.
    24  */
    26 package com.sun.tools.apt.comp;
    28 import java.util.*;
    29 import com.sun.mirror.apt.*;
    30 import com.sun.mirror.declaration.AnnotationTypeDeclaration;
    32 @SuppressWarnings("deprecation")
    33 public class BootstrapAPF implements AnnotationProcessorFactory {
    35     static final Collection<String> supportedOptions =
    36         Collections.unmodifiableSet(new HashSet<String>());
    38     static Collection<String> supportedAnnotations;
    39     static {
    40         Collection<String> c = new HashSet<String>();
    41         c.add("*");
    42         supportedAnnotations = Collections.unmodifiableCollection(c);
    43     }
    45     public BootstrapAPF(){}
    47     public Collection<String> supportedOptions() {
    48         return BootstrapAPF.supportedOptions;
    49     }
    51     public Collection<String> supportedAnnotationTypes() {
    52         return supportedAnnotations;
    53     }
    55     public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> atds,
    56             AnnotationProcessorEnvironment env) {
    57         return new PrintAP(env);
    58     }
    59 }

mercurial