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.Method
getAnnotatedExceptionTypes
Thejava.lang.reflect.Executable#getAnnotatedExceptionTypes
method.private java.lang.reflect.Method
getAnnotatedInterfaces
Thejava.lang.Class#getAnnotatedInterfaces
method.private java.lang.reflect.Method
getAnnotatedParameterTypes
Thejava.lang.reflect.Executable#getAnnotatedParameterTypes
method.private java.lang.reflect.Method
getAnnotatedReceiverType
Thejava.lang.reflect.Executable#getAnnotatedReceiverType
method.private java.lang.reflect.Method
getAnnotatedReturnType
Thejava.lang.reflect.Method#getAnnotatedReturnType
method.private java.lang.reflect.Method
getAnnotatedSuperclass
Thejava.lang.Class#getAnnotatedSuperclass
method.private java.lang.reflect.Method
getAnnotatedType
Thejava.lang.reflect.Field#getAnnotatedType
method.private java.lang.reflect.Method
getType
Thejava.lang.reflect.AnnotatedType#getType
method.-
Fields inherited from interface net.bytebuddy.description.type.TypeDescription.Generic.AnnotationReader.Dispatcher
NO_ARGUMENTS
-
-
Constructor Summary
Constructors Modifier Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeDescription.Generic
resolve(java.lang.reflect.AnnotatedElement annotatedType)
Resolves the annotated type as generic type description.TypeDescription.Generic.AnnotationReader
resolveExceptionType(java.lang.reflect.AccessibleObject executable, int index)
Resolves a loaded executable's exception type's type annotations.TypeDescription.Generic.AnnotationReader
resolveFieldType(java.lang.reflect.Field field)
Resolves a loaded field's type's type annotations.TypeDescription.Generic.AnnotationReader
resolveInterfaceType(java.lang.Class<?> type, int index)
Resolves a loaded type's interface type's type annotations.TypeDescription.Generic.AnnotationReader
resolveParameterType(java.lang.reflect.AccessibleObject executable, int index)
Resolves a loaded executable's type argument type's type annotations.TypeDescription.Generic
resolveReceiverType(java.lang.reflect.AccessibleObject executable)
Resolves a method's or constructor's receiver type.TypeDescription.Generic.AnnotationReader
resolveReturnType(java.lang.reflect.Method method)
Resolves a loaded method's return type's type annotations.TypeDescription.Generic.AnnotationReader
resolveSuperClassType(java.lang.Class<?> type)
Resolves a loaded type's super class's type annotations.TypeDescription.Generic.AnnotationReader
resolveTypeVariable(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#getAnnotatedSuperclass
method.
-
getAnnotatedInterfaces
private final java.lang.reflect.Method getAnnotatedInterfaces
Thejava.lang.Class#getAnnotatedInterfaces
method.
-
getAnnotatedType
private final java.lang.reflect.Method getAnnotatedType
Thejava.lang.reflect.Field#getAnnotatedType
method.
-
getAnnotatedReturnType
private final java.lang.reflect.Method getAnnotatedReturnType
Thejava.lang.reflect.Method#getAnnotatedReturnType
method.
-
getAnnotatedParameterTypes
private final java.lang.reflect.Method getAnnotatedParameterTypes
Thejava.lang.reflect.Executable#getAnnotatedParameterTypes
method.
-
getAnnotatedExceptionTypes
private final java.lang.reflect.Method getAnnotatedExceptionTypes
Thejava.lang.reflect.Executable#getAnnotatedExceptionTypes
method.
-
getAnnotatedReceiverType
private final java.lang.reflect.Method getAnnotatedReceiverType
Thejava.lang.reflect.Executable#getAnnotatedReceiverType
method.
-
getType
private final java.lang.reflect.Method getType
Thejava.lang.reflect.AnnotatedType#getType
method.
-
-
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#getAnnotatedSuperclass
method.getAnnotatedInterfaces
- Thejava.lang.Class#getAnnotatedInterfaces
method.getAnnotatedType
- Thejava.lang.reflect.Field#getAnnotatedType
method.getAnnotatedReturnType
- Thejava.lang.reflect.Method#getAnnotatedReturnType
method.getAnnotatedParameterTypes
- Thejava.lang.reflect.Executable#getAnnotatedParameterTypes
method.getAnnotatedExceptionTypes
- Thejava.lang.reflect.Executable#getAnnotatedExceptionTypes
method.getAnnotatedReceiverType
- Thejava.lang.reflect.Executable#getAnnotatedReceiverType
method.getType
- Thejava.lang.reflect.AnnotatedType#getType
method.
-
-
Method Detail
-
resolveTypeVariable
public TypeDescription.Generic.AnnotationReader resolveTypeVariable(java.lang.reflect.TypeVariable<?> typeVariable)
Resolves a formal type variable's type annotations.- Specified by:
resolveTypeVariable
in 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:
resolveSuperClassType
in 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:
resolveInterfaceType
in 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:
resolveFieldType
in 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:
resolveReturnType
in 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:
resolveParameterType
in 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:
resolveExceptionType
in 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,null
is returned.- Specified by:
resolveReceiverType
in 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:
resolve
in interfaceTypeDescription.Generic.AnnotationReader.Dispatcher
- Parameters:
annotatedType
- The loaded annotated type.- Returns:
- A description of the supplied annotated type.
-
-