Package net.bytebuddy.description.type
Interface TypeDescription.Generic.AnnotationReader.Dispatcher
-
- All Known Implementing Classes:
TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm,TypeDescription.Generic.AnnotationReader.Dispatcher.ForLegacyVm
- Enclosing interface:
- TypeDescription.Generic.AnnotationReader
public static interface TypeDescription.Generic.AnnotationReader.DispatcherA dispatcher that represents the type annotation API via reflective calls if the language feature is available on the current JVM.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTypeDescription.Generic.AnnotationReader.Dispatcher.CreationActionA creation action for a dispatcher.static classTypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVmA dispatcher for a modern JVM that supports type annotations.static classTypeDescription.Generic.AnnotationReader.Dispatcher.ForLegacyVmA dispatcher forTypeDescription.Generic.AnnotationReaders on a legacy VM that does not support type annotations.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Object[]NO_ARGUMENTSAn empty array that can be used to indicate no arguments to avoid an allocation on a reflective call.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TypeDescription.Genericresolve(java.lang.reflect.AnnotatedElement annotatedType)Resolves the annotated type as generic type description.TypeDescription.Generic.AnnotationReaderresolveExceptionType(java.lang.reflect.AccessibleObject executable, int index)Resolves a loaded executable's exception type's type annotations.TypeDescription.Generic.AnnotationReaderresolveFieldType(java.lang.reflect.Field field)Resolves a loaded field's type's type annotations.TypeDescription.Generic.AnnotationReaderresolveInterfaceType(java.lang.Class<?> type, int index)Resolves a loaded type's interface type's type annotations.TypeDescription.Generic.AnnotationReaderresolveParameterType(java.lang.reflect.AccessibleObject executable, int index)Resolves a loaded executable's type argument type's type annotations.TypeDescription.GenericresolveReceiverType(java.lang.reflect.AccessibleObject executable)Resolves a method's or constructor's receiver type.TypeDescription.Generic.AnnotationReaderresolveReturnType(java.lang.reflect.Method method)Resolves a loaded method's return type's type annotations.TypeDescription.Generic.AnnotationReaderresolveSuperClassType(java.lang.Class<?> type)Resolves a loaded type's super class's type annotations.TypeDescription.Generic.AnnotationReaderresolveTypeVariable(java.lang.reflect.TypeVariable<?> typeVariable)Resolves a formal type variable's type annotations.
-
-
-
Method Detail
-
resolveTypeVariable
TypeDescription.Generic.AnnotationReader resolveTypeVariable(java.lang.reflect.TypeVariable<?> typeVariable)
Resolves a formal type variable's type annotations.- Parameters:
typeVariable- The type variable to represent.- Returns:
- A suitable annotation reader.
-
resolveSuperClassType
TypeDescription.Generic.AnnotationReader resolveSuperClassType(java.lang.Class<?> type)
Resolves a loaded type's super class's type annotations.- Parameters:
type- The type to represent.- Returns:
- A suitable annotation reader.
-
resolveInterfaceType
TypeDescription.Generic.AnnotationReader resolveInterfaceType(java.lang.Class<?> type, int index)
Resolves a loaded type's interface type's type annotations.- Parameters:
type- The type to represent.index- The index of the interface.- Returns:
- A suitable annotation reader.
-
resolveFieldType
TypeDescription.Generic.AnnotationReader resolveFieldType(java.lang.reflect.Field field)
Resolves a loaded field's type's type annotations.- Parameters:
field- The field to represent.- Returns:
- A suitable annotation reader.
-
resolveReturnType
TypeDescription.Generic.AnnotationReader resolveReturnType(java.lang.reflect.Method method)
Resolves a loaded method's return type's type annotations.- Parameters:
method- The method to represent.- Returns:
- A suitable annotation reader.
-
resolveParameterType
TypeDescription.Generic.AnnotationReader resolveParameterType(java.lang.reflect.AccessibleObject executable, int index)
Resolves a loaded executable's type argument type's type annotations.- Parameters:
executable- The executable to represent.index- The type argument's index.- Returns:
- A suitable annotation reader.
-
resolveExceptionType
TypeDescription.Generic.AnnotationReader resolveExceptionType(java.lang.reflect.AccessibleObject executable, int index)
Resolves a loaded executable's exception type's type annotations.- Parameters:
executable- The executable to represent.index- The type argument's index.- Returns:
- A suitable annotation reader.
-
resolveReceiverType
TypeDescription.Generic resolveReceiverType(java.lang.reflect.AccessibleObject executable)
Resolves a method's or constructor's receiver type. If receiver types are not available on the executing VM,nullis returned.- Parameters:
executable- The executable for which the receiver type should be resolved.- Returns:
- The executable's receiver type or
null.
-
resolve
TypeDescription.Generic resolve(java.lang.reflect.AnnotatedElement annotatedType)
Resolves the annotated type as generic type description.- Parameters:
annotatedType- The loaded annotated type.- Returns:
- A description of the supplied annotated type.
-
-