Package net.bytebuddy.description.type
Class TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm
- java.lang.Object
-
- net.bytebuddy.description.type.TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm
-
- All Implemented Interfaces:
TypeDescription.Generic.AnnotationReader.Dispatcher
- Enclosing interface:
- TypeDescription.Generic.AnnotationReader.Dispatcher
@Enhance public static class TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm extends java.lang.Object implements TypeDescription.Generic.AnnotationReader.Dispatcher
A dispatcher for a modern JVM that supports type annotations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.TypeDescription.Generic.AnnotationReader.Dispatcher
TypeDescription.Generic.AnnotationReader.Dispatcher.CreationAction, TypeDescription.Generic.AnnotationReader.Dispatcher.ForJava8CapableVm, TypeDescription.Generic.AnnotationReader.Dispatcher.ForLegacyVm
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.MethodgetAnnotatedExceptionTypesThejava.lang.reflect.Executable#getAnnotatedExceptionTypesmethod.private java.lang.reflect.MethodgetAnnotatedInterfacesThejava.lang.Class#getAnnotatedInterfacesmethod.private java.lang.reflect.MethodgetAnnotatedParameterTypesThejava.lang.reflect.Executable#getAnnotatedParameterTypesmethod.private java.lang.reflect.MethodgetAnnotatedReceiverTypeThejava.lang.reflect.Executable#getAnnotatedReceiverTypemethod.private java.lang.reflect.MethodgetAnnotatedReturnTypeThejava.lang.reflect.Method#getAnnotatedReturnTypemethod.private java.lang.reflect.MethodgetAnnotatedSuperclassThejava.lang.Class#getAnnotatedSuperclassmethod.private java.lang.reflect.MethodgetAnnotatedTypeThejava.lang.reflect.Field#getAnnotatedTypemethod.private java.lang.reflect.MethodgetTypeThejava.lang.reflect.AnnotatedType#getTypemethod.-
Fields inherited from interface net.bytebuddy.description.type.TypeDescription.Generic.AnnotationReader.Dispatcher
NO_ARGUMENTS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedForJava8CapableVm(java.lang.reflect.Method getAnnotatedSuperclass, java.lang.reflect.Method getAnnotatedInterfaces, java.lang.reflect.Method getAnnotatedType, java.lang.reflect.Method getAnnotatedReturnType, java.lang.reflect.Method getAnnotatedParameterTypes, java.lang.reflect.Method getAnnotatedExceptionTypes, java.lang.reflect.Method getAnnotatedReceiverType, java.lang.reflect.Method getType)Creates a new dispatcher for a VM that supports type annotations.
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
getAnnotatedSuperclass
private final java.lang.reflect.Method getAnnotatedSuperclass
Thejava.lang.Class#getAnnotatedSuperclassmethod.
-
getAnnotatedInterfaces
private final java.lang.reflect.Method getAnnotatedInterfaces
Thejava.lang.Class#getAnnotatedInterfacesmethod.
-
getAnnotatedType
private final java.lang.reflect.Method getAnnotatedType
Thejava.lang.reflect.Field#getAnnotatedTypemethod.
-
getAnnotatedReturnType
private final java.lang.reflect.Method getAnnotatedReturnType
Thejava.lang.reflect.Method#getAnnotatedReturnTypemethod.
-
getAnnotatedParameterTypes
private final java.lang.reflect.Method getAnnotatedParameterTypes
Thejava.lang.reflect.Executable#getAnnotatedParameterTypesmethod.
-
getAnnotatedExceptionTypes
private final java.lang.reflect.Method getAnnotatedExceptionTypes
Thejava.lang.reflect.Executable#getAnnotatedExceptionTypesmethod.
-
getAnnotatedReceiverType
private final java.lang.reflect.Method getAnnotatedReceiverType
Thejava.lang.reflect.Executable#getAnnotatedReceiverTypemethod.
-
getType
private final java.lang.reflect.Method getType
Thejava.lang.reflect.AnnotatedType#getTypemethod.
-
-
Constructor Detail
-
ForJava8CapableVm
protected ForJava8CapableVm(java.lang.reflect.Method getAnnotatedSuperclass, java.lang.reflect.Method getAnnotatedInterfaces, java.lang.reflect.Method getAnnotatedType, java.lang.reflect.Method getAnnotatedReturnType, java.lang.reflect.Method getAnnotatedParameterTypes, java.lang.reflect.Method getAnnotatedExceptionTypes, java.lang.reflect.Method getAnnotatedReceiverType, java.lang.reflect.Method getType)Creates a new dispatcher for a VM that supports type annotations.- Parameters:
getAnnotatedSuperclass- Thejava.lang.Class#getAnnotatedSuperclassmethod.getAnnotatedInterfaces- Thejava.lang.Class#getAnnotatedInterfacesmethod.getAnnotatedType- Thejava.lang.reflect.Field#getAnnotatedTypemethod.getAnnotatedReturnType- Thejava.lang.reflect.Method#getAnnotatedReturnTypemethod.getAnnotatedParameterTypes- Thejava.lang.reflect.Executable#getAnnotatedParameterTypesmethod.getAnnotatedExceptionTypes- Thejava.lang.reflect.Executable#getAnnotatedExceptionTypesmethod.getAnnotatedReceiverType- Thejava.lang.reflect.Executable#getAnnotatedReceiverTypemethod.getType- Thejava.lang.reflect.AnnotatedType#getTypemethod.
-
-
Method Detail
-
resolveTypeVariable
public TypeDescription.Generic.AnnotationReader resolveTypeVariable(java.lang.reflect.TypeVariable<?> typeVariable)
Resolves a formal type variable's type annotations.- Specified by:
resolveTypeVariablein interfaceTypeDescription.Generic.AnnotationReader.Dispatcher- Parameters:
typeVariable- The type variable to represent.- Returns:
- A suitable annotation reader.
-
resolveSuperClassType
public TypeDescription.Generic.AnnotationReader resolveSuperClassType(java.lang.Class<?> type)
Resolves a loaded type's super class's type annotations.- Specified by:
resolveSuperClassTypein interfaceTypeDescription.Generic.AnnotationReader.Dispatcher- Parameters:
type- The type to represent.- Returns:
- A suitable annotation reader.
-
resolveInterfaceType
public TypeDescription.Generic.AnnotationReader resolveInterfaceType(java.lang.Class<?> type, int index)
Resolves a loaded type's interface type's type annotations.- Specified by:
resolveInterfaceTypein interfaceTypeDescription.Generic.AnnotationReader.Dispatcher- Parameters:
type- The type to represent.index- The index of the interface.- Returns:
- A suitable annotation reader.
-
resolveFieldType
public TypeDescription.Generic.AnnotationReader resolveFieldType(java.lang.reflect.Field field)
Resolves a loaded field's type's type annotations.- Specified by:
resolveFieldTypein interfaceTypeDescription.Generic.AnnotationReader.Dispatcher- Parameters:
field- The field to represent.- Returns:
- A suitable annotation reader.
-
resolveReturnType
public TypeDescription.Generic.AnnotationReader resolveReturnType(java.lang.reflect.Method method)
Resolves a loaded method's return type's type annotations.- Specified by:
resolveReturnTypein interfaceTypeDescription.Generic.AnnotationReader.Dispatcher- Parameters:
method- The method to represent.- Returns:
- A suitable annotation reader.
-
resolveParameterType
public TypeDescription.Generic.AnnotationReader resolveParameterType(java.lang.reflect.AccessibleObject executable, int index)
Resolves a loaded executable's type argument type's type annotations.- Specified by:
resolveParameterTypein interfaceTypeDescription.Generic.AnnotationReader.Dispatcher- Parameters:
executable- The executable to represent.index- The type argument's index.- Returns:
- A suitable annotation reader.
-
resolveExceptionType
public TypeDescription.Generic.AnnotationReader resolveExceptionType(java.lang.reflect.AccessibleObject executable, int index)
Resolves a loaded executable's exception type's type annotations.- Specified by:
resolveExceptionTypein interfaceTypeDescription.Generic.AnnotationReader.Dispatcher- Parameters:
executable- The executable to represent.index- The type argument's index.- Returns:
- A suitable annotation reader.
-
resolveReceiverType
public 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.- Specified by:
resolveReceiverTypein interfaceTypeDescription.Generic.AnnotationReader.Dispatcher- Parameters:
executable- The executable for which the receiver type should be resolved.- Returns:
- The executable's receiver type or
null.
-
resolve
public TypeDescription.Generic resolve(java.lang.reflect.AnnotatedElement annotatedType)
Resolves the annotated type as generic type description.- Specified by:
resolvein interfaceTypeDescription.Generic.AnnotationReader.Dispatcher- Parameters:
annotatedType- The loaded annotated type.- Returns:
- A description of the supplied annotated type.
-
-