Returns {@code null} if this {@code AnnotatedType} represents a * top-level type, or a local or anonymous class, or a primitive type, or * void. * *
Returns {@code null} if this {@code AnnotatedType} is an instance of * {@code AnnotatedArrayType}, {@code AnnotatedTypeVariable}, or * {@code AnnotatedWildcardType}. * * @implSpec * This default implementation returns {@code null} and performs no other * action. * * @return an {@code AnnotatedType} object representing the potentially * annotated type that this type is a member of, or {@code null} * @throws TypeNotPresentException if the owner type * refers to a non-existent type declaration * @throws MalformedParameterizedTypeException if the owner type * refers to a parameterized type that cannot be instantiated * for any reason * * @since 9 */ default AnnotatedType getAnnotatedOwnerType() { return null; } /** * Returns the underlying type that this annotated type represents. * * @return the type this annotated type represents */ public Type getType(); /** * {@inheritDoc} *
Note that any annotation returned by this method is a type
* annotation.
*
* @throws NullPointerException {@inheritDoc}
*/
@Override
Note that any annotations returned by this method are type
* annotations.
*/
@Override
Annotation[] getAnnotations();
/**
* {@inheritDoc}
* Note that any annotations returned by this method are type
* annotations.
*/
@Override
Annotation[] getDeclaredAnnotations();
}