< prev index next >

jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedType.java

Print this page




  43      * <p>Returns {@code null} if this {@code AnnotatedType} represents a
  44      *     top-level type, or a local or anonymous class, or a primitive type, or
  45      *     void.
  46      *
  47      * <p>Returns {@code null} if this {@code AnnotatedType} is an instance of
  48      *     {@code AnnotatedArrayType}, {@code AnnotatedTypeVariable}, or
  49      *     {@code AnnotatedWildcardType}.
  50      *
  51      * @implSpec
  52      * This default implementation returns {@code null} and performs no other
  53      * action.
  54      *
  55      * @return an {@code AnnotatedType} object representing the potentially
  56      *     annotated type that this type is a member of, or {@code null}
  57      * @throws TypeNotPresentException if the owner type
  58      *     refers to a non-existent type declaration
  59      * @throws MalformedParameterizedTypeException if the owner type
  60      *     refers to a parameterized type that cannot be instantiated
  61      *     for any reason
  62      *
  63      * @since 1.9
  64      */
  65     default AnnotatedType getAnnotatedOwnerType() {
  66         return null;
  67     }
  68 
  69     /**
  70      * Returns the underlying type that this annotated type represents.
  71      *
  72      * @return the type this annotated type represents
  73      */
  74     public Type getType();
  75 }


  43      * <p>Returns {@code null} if this {@code AnnotatedType} represents a
  44      *     top-level type, or a local or anonymous class, or a primitive type, or
  45      *     void.
  46      *
  47      * <p>Returns {@code null} if this {@code AnnotatedType} is an instance of
  48      *     {@code AnnotatedArrayType}, {@code AnnotatedTypeVariable}, or
  49      *     {@code AnnotatedWildcardType}.
  50      *
  51      * @implSpec
  52      * This default implementation returns {@code null} and performs no other
  53      * action.
  54      *
  55      * @return an {@code AnnotatedType} object representing the potentially
  56      *     annotated type that this type is a member of, or {@code null}
  57      * @throws TypeNotPresentException if the owner type
  58      *     refers to a non-existent type declaration
  59      * @throws MalformedParameterizedTypeException if the owner type
  60      *     refers to a parameterized type that cannot be instantiated
  61      *     for any reason
  62      *
  63      * @since 9
  64      */
  65     default AnnotatedType getAnnotatedOwnerType() {
  66         return null;
  67     }
  68 
  69     /**
  70      * Returns the underlying type that this annotated type represents.
  71      *
  72      * @return the type this annotated type represents
  73      */
  74     public Type getType();
  75 }
< prev index next >