20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package java.lang.reflect; 27 28 import java.lang.annotation.Annotation; 29 30 /** 31 * {@code AnnotatedType} represents the potentially annotated use of a type in 32 * the program currently running in this VM. The use may be of any type in the 33 * Java programming language, including an array type, a parameterized type, a 34 * type variable, or a wildcard type. 35 * 36 * Note that any annotations returned by methods on this interface are 37 * <em>type annotations</em> (JLS {@jls 9.7.4}) as the entity being 38 * potentially annotated is a type. 39 * 40 * @since 1.8 41 */ 42 public interface AnnotatedType extends AnnotatedElement { 43 44 /** 45 * Returns the potentially annotated type that this type is a member of, if 46 * this type represents a nested type. For example, if this type is 47 * {@code @TA O<T>.I<S>}, return a representation of {@code @TA O<T>}. 48 * 49 * <p>Returns {@code null} if this {@code AnnotatedType} represents a 50 * top-level type, or a local or anonymous class, or a primitive type, or 51 * void. 52 * 53 * <p>Returns {@code null} if this {@code AnnotatedType} is an instance of 54 * {@code AnnotatedArrayType}, {@code AnnotatedTypeVariable}, or 55 * {@code AnnotatedWildcardType}. 56 * 57 * @implSpec 58 * This default implementation returns {@code null} and performs no other 59 * action. | 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package java.lang.reflect; 27 28 import java.lang.annotation.Annotation; 29 30 /** 31 * {@code AnnotatedType} represents the potentially annotated use of a type in 32 * the program currently running in this VM. The use may be of any type in the 33 * Java programming language, including an array type, a parameterized type, a 34 * type variable, or a wildcard type. 35 * 36 * Note that any annotations returned by methods on this interface are 37 * <em>type annotations</em> (JLS {@jls 9.7.4}) as the entity being 38 * potentially annotated is a type. 39 * 40 * @jls 4.1 The Kinds of Types and Values 41 * @jls 4.2 Primitive Types and Values 42 * @jls 4.3 Reference Types and Values 43 * @jls 4.4 Type Variables 44 * @jls 4.5 Parameterized Types 45 * @jls 4.8 Raw Types 46 * @jls 4.9 Intersection Types 47 * @jls 10.1 Array Types 48 * @since 1.8 49 */ 50 public interface AnnotatedType extends AnnotatedElement { 51 52 /** 53 * Returns the potentially annotated type that this type is a member of, if 54 * this type represents a nested type. For example, if this type is 55 * {@code @TA O<T>.I<S>}, return a representation of {@code @TA O<T>}. 56 * 57 * <p>Returns {@code null} if this {@code AnnotatedType} represents a 58 * top-level type, or a local or anonymous class, or a primitive type, or 59 * void. 60 * 61 * <p>Returns {@code null} if this {@code AnnotatedType} is an instance of 62 * {@code AnnotatedArrayType}, {@code AnnotatedTypeVariable}, or 63 * {@code AnnotatedWildcardType}. 64 * 65 * @implSpec 66 * This default implementation returns {@code null} and performs no other 67 * action. |