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.ForRecordComponent,TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm.AnnotatedExceptionType,TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm.AnnotatedFieldType,TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm.AnnotatedInterfaceType,TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm.AnnotatedParameterizedType,TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm.AnnotatedReturnType,TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm.AnnotatedSuperClass,TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm.AnnotatedTypeVariableType,TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm.Resolved,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.AnnotationReaderAn annotation reader is responsible for lazily evaluating type annotations if this language feature is available on the current JVM.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTypeDescription.Generic.AnnotationReader.DelegatorA delegating annotation reader that delegates all invocations to an annotation reader that wraps the previous one.static interfaceTypeDescription.Generic.AnnotationReader.DispatcherA dispatcher that represents the type annotation API via reflective calls if the language feature is available on the current JVM.static classTypeDescription.Generic.AnnotationReader.ForComponentTypeA chained annotation reader for reading a component type.static classTypeDescription.Generic.AnnotationReader.ForOwnerTypeA chained annotation reader for reading an owner type.static classTypeDescription.Generic.AnnotationReader.ForTypeArgumentA chained annotation reader for reading a parameterized type's type argument.static classTypeDescription.Generic.AnnotationReader.ForTypeVariableBoundTypeA chained annotation reader for reading a type variable's type argument.static classTypeDescription.Generic.AnnotationReader.ForWildcardLowerBoundTypeA chained annotation reader for reading a wildcard type's lower bound type.static classTypeDescription.Generic.AnnotationReader.ForWildcardUpperBoundTypeA chained annotation reader for reading a wildcard type's upper bound type.static classTypeDescription.Generic.AnnotationReader.NoOpA non-operational annotation reader.
-
Field Summary
Fields Modifier and Type Field Description static TypeDescription.Generic.AnnotationReader.DispatcherDISPATCHERThe dispatcher to use.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AnnotationListasList()Returns the underlying type annotations as a list.TypeDescription.Generic.AnnotationReaderofComponentType()Returns a reader for type annotations of an array's component type.TypeDescription.Generic.AnnotationReaderofOuterClass()Returns a reader for type annotations of an inner class type's outer type.TypeDescription.Generic.AnnotationReaderofOwnerType()Returns a reader for type annotations of a parameterized type's owner type.TypeDescription.Generic.AnnotationReaderofTypeArgument(int index)Returns a reader for type annotations of a parameterized type's type argument.TypeDescription.Generic.AnnotationReaderofTypeVariableBoundType(int index)Returns a reader for type annotations of a type variable's bound.TypeDescription.Generic.AnnotationReaderofWildcardLowerBoundType(int index)Returns a reader for type annotations of an represented element's wildcard lower bound.TypeDescription.Generic.AnnotationReaderofWildcardUpperBoundType(int index)Returns a reader for type annotations of an represented element's wildcard upper bound.java.lang.reflect.AnnotatedElementresolve()Resolves the underlyingAnnotatedElement.
-
-
-
Field Detail
-
DISPATCHER
static final TypeDescription.Generic.AnnotationReader.Dispatcher DISPATCHER
The dispatcher to use.
-
-
Method Detail
-
resolve
java.lang.reflect.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
TypeDescription.Generic.AnnotationReader ofWildcardUpperBoundType(int index)
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
TypeDescription.Generic.AnnotationReader ofWildcardLowerBoundType(int index)
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
TypeDescription.Generic.AnnotationReader ofTypeVariableBoundType(int index)
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
TypeDescription.Generic.AnnotationReader ofTypeArgument(int index)
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.
-
-