AnnotatedElement
AnnotatedArrayType
, AnnotatedParameterizedType
, AnnotatedTypeVariable
, AnnotatedWildcardType
public interface AnnotatedType extends AnnotatedElement
AnnotatedType
represents the potentially annotated use of a type in
the program currently running in this VM. The use may be of any type in the
Java programming language, including an array type, a parameterized type, a
type variable, or a wildcard type.Modifier and Type | Method | Description |
---|---|---|
default AnnotatedType |
getAnnotatedOwnerType() |
Returns the potentially annotated type that this type is a member of, if
this type represents a nested type.
|
Type |
getType() |
Returns the underlying type that this annotated type represents.
|
getAnnotation, getAnnotations, getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredAnnotationsByType, isAnnotationPresent
default AnnotatedType getAnnotatedOwnerType()
@TA O<T>.I<S>
, return a representation of @TA O<T>
.
Returns null
if this AnnotatedType
represents a
top-level type, or a local or anonymous class, or a primitive type, or
void.
Returns null
if this AnnotatedType
is an instance of
AnnotatedArrayType
, AnnotatedTypeVariable
, or
AnnotatedWildcardType
.
null
and performs no other
action.AnnotatedType
object representing the potentially
annotated type that this type is a member of, or null
TypeNotPresentException
- if the owner type
refers to a non-existent type declarationMalformedParameterizedTypeException
- if the owner type
refers to a parameterized type that cannot be instantiated
for any reasonType getType()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps