Class Super.Binder.TypeLocator.ForType
java.lang.Object
net.bytebuddy.implementation.bind.annotation.Super.Binder.TypeLocator.ForType
- All Implemented Interfaces:
Super.Binder.TypeLocator
- Enclosing interface:
Super.Binder.TypeLocator
@Enhance
public static class Super.Binder.TypeLocator.ForType
extends Object
implements Super.Binder.TypeLocator
A type locator that returns a given type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bind.annotation.Super.Binder.TypeLocator
Super.Binder.TypeLocator.ForInstrumentedType, Super.Binder.TypeLocator.ForParameterType, Super.Binder.TypeLocator.ForType
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeDescription
The type to be returned upon resolution. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForType
(TypeDescription typeDescription) Creates a new type locator for a given type. -
Method Summary
Modifier and TypeMethodDescriptionprotected static Super.Binder.TypeLocator
of
(TypeDescription typeDescription) Resolves a type locator based upon an annotation value.resolve
(TypeDescription instrumentedType, TypeDescription.Generic parameterType) Resolves the target type.
-
Field Details
-
typeDescription
The type to be returned upon resolution.
-
-
Constructor Details
-
ForType
Creates a new type locator for a given type.- Parameters:
typeDescription
- The type to be returned upon resolution.
-
-
Method Details
-
of
Resolves a type locator based upon an annotation value.- Parameters:
typeDescription
- The annotation's value.- Returns:
- The appropriate type locator.
-
resolve
public TypeDescription resolve(TypeDescription instrumentedType, TypeDescription.Generic parameterType) Resolves the target type.- Specified by:
resolve
in interfaceSuper.Binder.TypeLocator
- Parameters:
instrumentedType
- The instrumented type.parameterType
- The type of the target parameter.- Returns:
- The proxy type.
-