Package net.bytebuddy.asm
Class Advice.OffsetMapping.Target.ForStackManipulation
java.lang.Object
net.bytebuddy.asm.Advice.OffsetMapping.Target.ForStackManipulation
- All Implemented Interfaces:
Advice.OffsetMapping.Target
- Enclosing interface:
Advice.OffsetMapping.Target
@Enhance
public static class Advice.OffsetMapping.Target.ForStackManipulation
extends Object
implements Advice.OffsetMapping.Target
A target for an offset mapping that represents a read-only stack manipulation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA constant value that can be written to.Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.OffsetMapping.Target
Advice.OffsetMapping.Target.AbstractReadOnlyAdapter, Advice.OffsetMapping.Target.ForArray, Advice.OffsetMapping.Target.ForDefaultValue, Advice.OffsetMapping.Target.ForField, Advice.OffsetMapping.Target.ForStackManipulation, Advice.OffsetMapping.Target.ForVariable -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StackManipulationThe represented stack manipulation. -
Constructor Summary
ConstructorsConstructorDescriptionForStackManipulation(StackManipulation stackManipulation) Creates a new target for an offset mapping for a stack manipulation. -
Method Summary
Modifier and TypeMethodDescriptionstatic Advice.OffsetMapping.TargetCreates a target for an offset mapping for a constant value ornull.static Advice.OffsetMapping.Targetof(MethodDescription.InDefinedShape methodDescription) Creates a target for aMethodorConstructorconstant.static Advice.OffsetMapping.Targetof(TypeDescription typeDescription) Creates a target for an offset mapping for a type constant.resolveIncrement(int value) Resolves an increment instruction.Resolves a read instruction.Resolves a write instruction.
-
Field Details
-
stackManipulation
The represented stack manipulation.
-
-
Constructor Details
-
ForStackManipulation
Creates a new target for an offset mapping for a stack manipulation.- Parameters:
stackManipulation- The represented stack manipulation.
-
-
Method Details
-
of
Creates a target for aMethodorConstructorconstant.- Parameters:
methodDescription- The method or constructor to represent.- Returns:
- A mapping for a method or constructor constant.
-
of
Creates a target for an offset mapping for a type constant.- Parameters:
typeDescription- The type constant to represent.- Returns:
- A mapping for a type constant.
-
of
Creates a target for an offset mapping for a constant value ornull.- Parameters:
value- The constant value to represent ornull.- Returns:
- An appropriate target for an offset mapping.
-
resolveRead
Resolves a read instruction.- Specified by:
resolveReadin interfaceAdvice.OffsetMapping.Target- Returns:
- A stack manipulation that represents a reading of an advice parameter.
-
resolveWrite
Resolves a write instruction.- Specified by:
resolveWritein interfaceAdvice.OffsetMapping.Target- Returns:
- A stack manipulation that represents a writing to an advice parameter.
-
resolveIncrement
Resolves an increment instruction.- Specified by:
resolveIncrementin interfaceAdvice.OffsetMapping.Target- Parameters:
value- The incrementation value.- Returns:
- A stack manipulation that represents a writing to an advice parameter.
-