0N/A/*
553N/A * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
553N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
553N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
553N/A * or visit www.oracle.com if you need additional information or have any
553N/A * questions.
0N/A */
0N/A
0N/Apackage javax.annotation.processing;
0N/A
0N/Aimport javax.lang.model.element.Element;
0N/Aimport javax.lang.model.element.TypeElement;
0N/Aimport java.util.Set;
0N/Aimport java.lang.annotation.Annotation;
0N/A
0N/A/**
0N/A * An annotation processing tool framework will {@linkplain
0N/A * Processor#process provide an annotation processor with an object
0N/A * implementing this interface} so that the processor can query for
0N/A * information about a round of annotation processing.
0N/A *
0N/A * @author Joseph D. Darcy
0N/A * @author Scott Seligman
0N/A * @author Peter von der Ahé
0N/A * @since 1.6
0N/A */
0N/Apublic interface RoundEnvironment {
0N/A /**
0N/A * Returns {@code true} if types generated by this round will not
0N/A * be subject to a subsequent round of annotation processing;
0N/A * returns {@code false} otherwise.
0N/A *
0N/A * @return {@code true} if types generated by this round will not
0N/A * be subject to a subsequent round of annotation processing;
0N/A * returns {@code false} otherwise
0N/A */
0N/A boolean processingOver();
0N/A
0N/A /**
0N/A * Returns {@code true} if an error was raised in the prior round
0N/A * of processing; returns {@code false} otherwise.
0N/A *
0N/A * @return {@code true} if an error was raised in the prior round
0N/A * of processing; returns {@code false} otherwise
0N/A */
0N/A boolean errorRaised();
0N/A
0N/A /**
0N/A * Returns the root elements for annotation processing generated
0N/A * by the prior round.
0N/A *
0N/A * @return the root elements for annotation processing generated
0N/A * by the prior round, or an empty set if there were none
0N/A */
0N/A Set<? extends Element> getRootElements();
0N/A
0N/A /**
0N/A * Returns the elements annotated with the given annotation type.
0N/A * The annotation may appear directly or be inherited. Only
0N/A * package elements and type elements <i>included</i> in this
0N/A * round of annotation processing, or declarations of members,
0N/A * constructors, parameters, or type parameters declared within
0N/A * those, are returned. Included type elements are {@linkplain
0N/A * #getRootElements root types} and any member types nested within
0N/A * them. Elements in a package are not considered included simply
0N/A * because a {@code package-info} file for that package was
0N/A * created.
0N/A *
0N/A * @param a annotation type being requested
0N/A * @return the elements annotated with the given annotation type,
0N/A * or an empty set if there are none
0N/A * @throws IllegalArgumentException if the argument does not
0N/A * represent an annotation type
0N/A */
0N/A Set<? extends Element> getElementsAnnotatedWith(TypeElement a);
0N/A
0N/A /**
0N/A * Returns the elements annotated with the given annotation type.
0N/A * The annotation may appear directly or be inherited. Only
0N/A * package elements and type elements <i>included</i> in this
0N/A * round of annotation processing, or declarations of members,
0N/A * constructors, parameters, or type parameters declared within
0N/A * those, are returned. Included type elements are {@linkplain
0N/A * #getRootElements root types} and any member types nested within
0N/A * them. Elements in a package are not considered included simply
0N/A * because a {@code package-info} file for that package was
0N/A * created.
0N/A *
0N/A * @param a annotation type being requested
0N/A * @return the elements annotated with the given annotation type,
0N/A * or an empty set if there are none
0N/A * @throws IllegalArgumentException if the argument does not
0N/A * represent an annotation type
0N/A */
0N/A Set<? extends Element> getElementsAnnotatedWith(Class<? extends Annotation> a);
0N/A}