777N/A * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 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 * 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 * 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. 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 0N/A * Interfaces used to model elements of the Java programming language. 448N/A * The term "element" in this package is used to refer to program 448N/A * elements, the declared entities that make up a program. Elements 448N/A * include classes, interfaces, methods, constructors, and fields. 448N/A * The interfaces in this package do not model the structure of a 448N/A * program inside a method body; for example there is no 448N/A * representation of a {@code for} loop or {@code try}-{@code finally} 448N/A * block. However, the interfaces can model some structures only 448N/A * appearing inside method bodies, such as local variables and 0N/A * <p>When used in the context of annotation processing, an accurate 0N/A * model of the element being represented must be returned. As this 0N/A * is a language model, the source code provides the fiducial 0N/A * (reference) representation of the construct in question rather than 0N/A * a representation in an executable output like a class file. 0N/A * Executable output may serve as the basis for creating a modeling 0N/A * element. However, the process of translating source code to 0N/A * executable output may not permit recovering some aspects of the 0N/A * source code representation. For example, annotations with 0N/A * {@linkplain java.lang.annotation.RetentionPolicy#SOURCE source} 0N/A * {@linkplain java.lang.annotation.Retention retention} cannot be 0N/A * recovered from class files and class files might not be able to 0N/A * provide source position information. The {@linkplain 0N/A * javax.lang.model.element.Modifier modifiers} on an element may 0N/A * differ in some cases including 0N/A * <li> {@code strictfp} on a class or interface 0N/A * <li> {@code final} on a parameter 0N/A * <li> {@code protected}, {@code private}, and {@code static} on classes and interfaces 0N/A * Additionally, synthetic constructs in a class file, such as 0N/A * accessor methods used in implementing nested classes and bridge 0N/A * methods used in implementing covariant returns, are translation 0N/A * artifacts outside of this model. 0N/A * <p>During annotation processing, operating on incomplete or 0N/A * erroneous programs is necessary; however, there are fewer 0N/A * guarantees about the nature of the resulting model. If the source 777N/A * code is not syntactically well-formed or has some other 777N/A * irrecoverable error that could not be removed by the generation of 777N/A * new types, a model may or may not be provided as a quality of 777N/A * implementation issue. 777N/A * If a program is syntactically valid but erroneous in some other 777N/A * fashion, any returned model must have no less information than if 777N/A * all the method bodies in the program were replaced by {@code "throw 777N/A * new RuntimeException();"}. If a program refers to a missing type XYZ, 0N/A * the returned model must contain no less information than if the 0N/A * declaration of type XYZ were assumed to be {@code "class XYZ {}"}, 0N/A * {@code "interface XYZ {}"}, {@code "enum XYZ {}"}, or {@code 0N/A * "@interface XYZ {}"}. If a program refers to a missing type {@code 0N/A * XYZ<K1, ... ,Kn>}, the returned model must contain no less 0N/A * information than if the declaration of XYZ were assumed to be 0N/A * {@code "class XYZ<T1, ... ,Tn> {}"} or {@code "interface XYZ<T1, 0N/A * <p> Unless otherwise specified in a particular implementation, the 0N/A * collections returned by methods in this package should be expected 0N/A * to be unmodifiable by the caller and unsafe for concurrent access. 0N/A * <p> Unless otherwise specified, methods in this package will throw 0N/A * a {@code NullPointerException} if given a {@code null} argument. 0N/A * @author Joseph D. Darcy 0N/A * @author Scott Seligman 0N/A * @author Peter von der Ahé