Package net.bytebuddy.description.type
Interface TypeDescription.Generic.AnnotationReader
- All Known Implementing Classes:
TypeDescription.Generic.AnnotationReader.Delegator
,TypeDescription.Generic.AnnotationReader.Delegator.Chained
,TypeDescription.Generic.AnnotationReader.Delegator.ForLoadedExecutableExceptionType
,TypeDescription.Generic.AnnotationReader.Delegator.ForLoadedExecutableParameterType
,TypeDescription.Generic.AnnotationReader.Delegator.ForLoadedField
,TypeDescription.Generic.AnnotationReader.Delegator.ForLoadedInterface
,TypeDescription.Generic.AnnotationReader.Delegator.ForLoadedMethodReturnType
,TypeDescription.Generic.AnnotationReader.Delegator.ForLoadedRecordComponent
,TypeDescription.Generic.AnnotationReader.Delegator.ForLoadedSuperClass
,TypeDescription.Generic.AnnotationReader.Delegator.ForLoadedTypeVariable
,TypeDescription.Generic.AnnotationReader.Delegator.Simple
,TypeDescription.Generic.AnnotationReader.ForComponentType
,TypeDescription.Generic.AnnotationReader.ForOwnerType
,TypeDescription.Generic.AnnotationReader.ForTypeArgument
,TypeDescription.Generic.AnnotationReader.ForTypeVariableBoundType
,TypeDescription.Generic.AnnotationReader.ForTypeVariableBoundType.OfFormalTypeVariable
,TypeDescription.Generic.AnnotationReader.ForWildcardLowerBoundType
,TypeDescription.Generic.AnnotationReader.ForWildcardUpperBoundType
,TypeDescription.Generic.AnnotationReader.NoOp
- Enclosing interface:
TypeDescription.Generic
public static interface TypeDescription.Generic.AnnotationReader
An annotation reader is responsible for lazily evaluating type annotations if this language
feature is available on the current JVM.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A delegating annotation reader that delegates all invocations to an annotation reader that wraps the previous one.static class
A chained annotation reader for reading a component type.static class
A chained annotation reader for reading an owner type.static class
A chained annotation reader for reading a parameterized type's type argument.static class
A chained annotation reader for reading a type variable's type argument.static class
A chained annotation reader for reading a wildcard type's lower bound type.static class
A chained annotation reader for reading a wildcard type's upper bound type.static enum
A non-operational annotation reader. -
Method Summary
Modifier and TypeMethodDescriptionasList()
Returns the underlying type annotations as a list.Returns a reader for type annotations of an array's component type.Returns a reader for type annotations of an inner class type's outer type.Returns a reader for type annotations of a parameterized type's owner type.ofTypeArgument
(int index) Returns a reader for type annotations of a parameterized type's type argument.ofTypeVariableBoundType
(int index) Returns a reader for type annotations of a type variable's bound.ofWildcardLowerBoundType
(int index) Returns a reader for type annotations of an represented element's wildcard lower bound.ofWildcardUpperBoundType
(int index) Returns a reader for type annotations of an represented element's wildcard upper bound.resolve()
Resolves the underlyingAnnotatedElement
.
-
Method Details
-
resolve
AnnotatedElement resolve()Resolves the underlyingAnnotatedElement
.- Returns:
- The underlying annotated element.
-
asList
AnnotationList asList()Returns the underlying type annotations as a list.- Returns:
- The underlying type annotations as a list.
-
ofWildcardUpperBoundType
Returns a reader for type annotations of an represented element's wildcard upper bound.- Parameters:
index
- The wildcard bound's index.- Returns:
- An annotation reader for the underlying annotated upper bound.
-
ofWildcardLowerBoundType
Returns a reader for type annotations of an represented element's wildcard lower bound.- Parameters:
index
- The wildcard bound's index.- Returns:
- An annotation reader for the underlying annotated lower bound.
-
ofTypeVariableBoundType
Returns a reader for type annotations of a type variable's bound.- Parameters:
index
- The bound's index.- Returns:
- An annotation reader for the underlying annotated bound.
-
ofTypeArgument
Returns a reader for type annotations of a parameterized type's type argument.- Parameters:
index
- The bound's index.- Returns:
- An annotation reader for the underlying annotated bound..
-
ofOwnerType
TypeDescription.Generic.AnnotationReader ofOwnerType()Returns a reader for type annotations of a parameterized type's owner type.
Important: This feature is not currently implemented by the Java reflection API.
- Returns:
- An annotation reader for the underlying owner type.
-
ofOuterClass
TypeDescription.Generic.AnnotationReader ofOuterClass()Returns a reader for type annotations of an inner class type's outer type.
Important: This feature is not currently implemented by the Java reflection API.
- Returns:
- An annotation reader for the underlying owner type.
-
ofComponentType
TypeDescription.Generic.AnnotationReader ofComponentType()Returns a reader for type annotations of an array's component type.- Returns:
- An annotation reader for the underlying component type.
-