Package net.bytebuddy.asm
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 class
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.Factory<T extends Annotation>
A factory to produce an offset mapping based upon a stack manipulation..static class
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfAnnotationProperty<T extends Annotation>
A factory that binds a given annotation property to the parameter.static class
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfDefaultValue<T extends Annotation>
A factory that binds the default value of the annotated parameter, i.e.static class
MemberSubstitution.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 class
MemberSubstitution.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 class
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.Resolved
A resolved offset mapping for a stack manipulation.Nested classes/interfaces inherited from interface net.bytebuddy.asm.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.ForField, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle, 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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StackManipulation
The stack manipulation to apply.private final TypeDescription.Generic
The type of the parameter or method target that is bound by this mapping.private final TypeDescription.Generic
The type of the value that is produced by the stack manipulation. -
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.
-
Field Details
-
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.
-
-
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:
resolve
in 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.
-