jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedArrayType.java
author mli
Wed, 31 May 2017 19:54:16 -0700
changeset 45434 4582657c7260
parent 35302 e4d2275861c3
permissions -rw-r--r--
8181082: class-level since tag issues in java.base & java.datatransfer module Reviewed-by: alanb, serb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15510
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
     1
/*
31177
c8ceef082391 8098790: Improve cross references and wording in java.lang.reflect.AnnotatedFoo type
darcy
parents: 25859
diff changeset
     2
 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
15510
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
     4
 *
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    10
 *
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    15
 * accompanied this code).
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    16
 *
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    20
 *
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    23
 * questions.
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    24
 */
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    25
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    26
package java.lang.reflect;
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    27
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    28
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    29
/**
20481
2735b307d256 8007072: Update Core Reflection for Type Annotations to match latest spec
jfranck
parents: 15510
diff changeset
    30
 * {@code AnnotatedArrayType} represents the potentially annotated use of an
2735b307d256 8007072: Update Core Reflection for Type Annotations to match latest spec
jfranck
parents: 15510
diff changeset
    31
 * array type, whose component type may itself represent the annotated use of a
2735b307d256 8007072: Update Core Reflection for Type Annotations to match latest spec
jfranck
parents: 15510
diff changeset
    32
 * type.
15510
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    33
 *
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    34
 * @since 1.8
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    35
 */
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    36
public interface AnnotatedArrayType extends AnnotatedType {
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    37
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    38
    /**
20481
2735b307d256 8007072: Update Core Reflection for Type Annotations to match latest spec
jfranck
parents: 15510
diff changeset
    39
     * Returns the potentially annotated generic component type of this array type.
15510
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    40
     *
20481
2735b307d256 8007072: Update Core Reflection for Type Annotations to match latest spec
jfranck
parents: 15510
diff changeset
    41
     * @return the potentially annotated generic component type of this array type
31177
c8ceef082391 8098790: Improve cross references and wording in java.lang.reflect.AnnotatedFoo type
darcy
parents: 25859
diff changeset
    42
     * @see GenericArrayType#getGenericComponentType()
15510
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    43
     */
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    44
    AnnotatedType  getAnnotatedGenericComponentType();
34708
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    45
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    46
    /**
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    47
     * Returns the potentially annotated type that this type is a member of, if
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    48
     * this type represents a nested type. For example, if this type is
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    49
     * {@code @TA O<T>.I<S>}, return a representation of {@code @TA O<T>}.
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    50
     *
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    51
     * <p>Returns {@code null} for an {@code AnnotatedType} that is an instance
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    52
     *     of {@code AnnotatedArrayType}.
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    53
     *
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    54
     * @return {@code null}
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    55
     *
35302
e4d2275861c3 8136494: Update "@since 1.9" to "@since 9" to match java.version.specification
iris
parents: 34708
diff changeset
    56
     * @since 9
34708
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    57
     */
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    58
    @Override
4a1e3728135c 8057804: AnnotatedType interfaces provide no way to get annotations on owner type
jfranck
parents: 31177
diff changeset
    59
    AnnotatedType getAnnotatedOwnerType();
15510
898d924a7efd 8004698: Implement Core Reflection for Type Annotations
jfranck
parents:
diff changeset
    60
}