Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
- Enclosing interface:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
@Enhance
public static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation
extends Object
implements MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
An offset mapping that resolves a given stack manipulation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.Factory<T extends Annotation>A factory to produce an offset mapping based upon a stack manipulation..static classMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfAnnotationProperty<T extends Annotation>A factory that binds a given annotation property to the parameter.static classMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfDefaultValue<T extends Annotation>A factory that binds the default value of the annotated parameter, i.e.static classMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfDynamicInvocation<T extends Annotation>A factory that invokes a method dynamically and assignes the result to the annotated parameter.static classMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfSerializedConstant<T extends Annotation>Assigns a value to the annotated parameter that is deserialized from a given input.protected static classMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.ResolvedA resolved offset mapping for a stack manipulation.Nested classes/interfaces inherited from interface MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForAllArguments, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForArgument, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForCurrent, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForDynamicConstant, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForHandle, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForSelfCallHandle, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStubValue, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference -
Constructor Summary
ConstructorsConstructorDescriptionForStackManipulation(StackManipulation stackManipulation, TypeDescription.Generic typeDescription, TypeDescription.Generic targetType) Creates a new offset mapping for a stack manipulation. -
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends Annotation>
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<S> Resolves an offset mapping that binds the provided annotation type to a given constant value.resolve(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod) Resolves an offset mapping for a given instrumented method.
-
Constructor Details
-
ForStackManipulation
public ForStackManipulation(StackManipulation stackManipulation, TypeDescription.Generic typeDescription, TypeDescription.Generic targetType) Creates a new offset mapping for a stack manipulation.- Parameters:
stackManipulation- The stack manipulation to apply.typeDescription- The type of the value that is produced by the stack manipulation.targetType- The type of the parameter or method target that is bound by this mapping.
-
-
Method Details
-
of
public static <S extends Annotation> MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<S> of(Class<S> annotationType, @MaybeNull Object value) Resolves an offset mapping that binds the provided annotation type to a given constant value.- Type Parameters:
S- The type of the annotation.- Parameters:
annotationType- The annotation type to bind.value- The constant value being bound ornull.- Returns:
- An appropriate factory for an offset mapping.
-
resolve
public MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved resolve(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod) Resolves an offset mapping for a given instrumented method.- Specified by:
resolvein interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping- Parameters:
assigner- The assigner to use.typing- The typing to use if no explicit typing is specified.instrumentedType- The instrumented type.instrumentedMethod- The instrumented method.- Returns:
- A resolved version of this offset mapping.
-