553N/A * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. 308N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 308N/A * This code is free software; you can redistribute it and/or modify it 308N/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 308N/A * particular file as subject to the "Classpath" exception as provided 553N/A * by Oracle in the LICENSE file that accompanied this code. 308N/A * This code is distributed in the hope that it will be useful, but WITHOUT 308N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 308N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 308N/A * version 2 for more details (a copy is included in the LICENSE file that 308N/A * accompanied this code). 308N/A * You should have received a copy of the GNU General Public License version 308N/A * 2 along with this work; if not, write to the Free Software Foundation, 308N/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 308N/A * Describes the type of program element an extended annotation (or extended 308N/A * compound attribute) targets. 308N/A * By comparison, a Tree.Kind has enum values for all elements in the AST, and 308N/A * it does not provide enough resolution for type arguments (i.e., whether an 308N/A * annotation targets a type argument in a local variable, method return type, 580N/A * <p><b>This is NOT part of any supported API. 580N/A * If you write code that depends on this, you do so at your own risk. 308N/A * This code and its internal interfaces are subject to change or 308N/A * deletion without notice.</b> 308N/A // Some target types are commented out, because Java doesn't permit such 308N/A // targets. They are included here to confirm that their omission is 308N/A // intentional omission not an accidental omission. 308N/A /** For annotations on typecasts. */ 308N/A /** For annotations on a type argument or nested array of a typecast. */ 308N/A /** For annotations on type tests. */ 308N/A /** For annotations on a type argument or nested array of a type test. */ 308N/A /** For annotations on object creation expressions. */ 308N/A * For annotations on a type argument or nested array of an object creation 308N/A /** For annotations on the method receiver. */ 308N/A //@Deprecated METHOD_RECEIVER_GENERIC_OR_ARRAY(0x07, HasLocation), 308N/A /** For annotations on local variables. */ 308N/A /** For annotations on a type argument or nested array of a local. */ 308N/A // handled by regular annotations 308N/A //@Deprecated METHOD_RETURN(0x0A), 308N/A * For annotations on a type argument or nested array of a method return 308N/A // handled by regular annotations 308N/A //@Deprecated METHOD_PARAMETER(0x0C), 308N/A /** For annotations on a type argument or nested array of a method parameter. */ 308N/A // handled by regular annotations 308N/A //@Deprecated FIELD(0x0E), 308N/A /** For annotations on a type argument or nested array of a field. */ 308N/A /** For annotations on a bound of a type parameter of a class. */ 308N/A * For annotations on a type argument or nested array of a bound of a type 308N/A * parameter of a class. 308N/A /** For annotations on a bound of a type parameter of a method. */ 308N/A * For annotations on a type argument or nested array of a bound of a type 308N/A * parameter of a method. 308N/A /** For annotations on the type of an "extends" or "implements" clause. */ 308N/A /** For annotations on the inner type of an "extends" or "implements" clause. */ 308N/A /** For annotations on a throws clause in a method declaration. */ 308N/A //@Deprecated THROWS_GENERIC_OR_ARRAY(0x17, HasLocation), 308N/A /** For annotations in type arguments of object creation expressions. */ 308N/A //@Deprecated METHOD_TYPE_PARAMETER_GENERIC_OR_ARRAY(0x21, HasLocation, HasParameter), 308N/A //@Deprecated CLASS_TYPE_PARAMETER_GENERIC_OR_ARRAY(0x23, HasLocation, HasParameter), 308N/A /** For annotations with an unknown target. */ 308N/A * Returns whether or not this TargetType represents an annotation whose 308N/A * target is an inner type of a generic or array type. 308N/A * @return true if this TargetType represents an annotation on an inner 308N/A * type, false otherwise 308N/A * Returns whether or not this TargetType represents an annotation whose 308N/A * target has a parameter index. 308N/A * @return true if this TargetType has a parameter index, 308N/A * Returns whether or not this TargetType represents an annotation whose 308N/A * target is a type parameter bound. 308N/A * @return true if this TargetType represents an type parameter bound 308N/A * annotation, false otherwise 309N/A * Returns whether or not this TargetType represents an annotation whose 309N/A * target is exclusively a tree in a method body 309N/A * Note: wildcard bound targets could target a local tree and a class 309N/A * member declaration signature tree