Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.Factory<T extends Annotation>
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase<T>
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.Factory<T>
- Type Parameters:
T- The type of the annotation.
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T>
- Enclosing class:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation
@Enhance
public static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.Factory<T extends Annotation>
extends MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase<T>
A factory to produce an offset mapping based upon a stack manipulation..
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase<S extends Annotation>, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.Simple<S extends Annotation>, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.WithParameterSupportOnly<S extends Annotation> -
Field Summary
FieldsModifier and TypeFieldDescriptionThe annotation type.private final StackManipulationThe stack manipulation that produces the assigned value.private final TypeDescription.GenericThe type of the value that is produced by the stack manipulation. -
Constructor Summary
ConstructorsConstructorDescriptionFactory(Class<T> annotationType, StackManipulation stackManipulation, TypeDescription.Generic typeDescription) Creates a factory for a given stack manipulation.Factory(Class<T> annotationType, ConstantValue value) Creates a factory for a given constant value. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of the annotation for this factory.make(TypeDescription.Generic target, AnnotationDescription.Loadable<T> annotation) Returns an offset mapping for the bound method target or parameter.Methods inherited from class net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase
make, make
-
Field Details
-
annotationType
The annotation type. -
stackManipulation
The stack manipulation that produces the assigned value. -
typeDescription
The type of the value that is produced by the stack manipulation.
-
-
Constructor Details
-
Factory
Creates a factory for a given constant value.- Parameters:
annotationType- The value to assign to the parameter.value- The value that is bound.
-
Factory
public Factory(Class<T> annotationType, StackManipulation stackManipulation, TypeDescription.Generic typeDescription) Creates a factory for a given stack manipulation.- Parameters:
annotationType- The value to assign to the parameter.stackManipulation- The stack manipulation that produces the assigned value.typeDescription- The type of the value that is produced by the stack manipulation.
-
-
Method Details
-
getAnnotationType
Returns the type of the annotation for this factory.- Returns:
- The type of the annotation for this factory.
-
make
protected MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping make(TypeDescription.Generic target, AnnotationDescription.Loadable<T> annotation) Description copied from class:MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBaseReturns an offset mapping for the bound method target or parameter.- Specified by:
makein classMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase<T extends Annotation>- Parameters:
target- The declaring type of a non-static method or a parameter type.annotation- The annotation that was found on the method or parameter.- Returns:
- An appropriate offset mapping.
-