Package net.bytebuddy.asm
Class Advice.Dispatcher.RelocationHandler.ForValue.Bound
- java.lang.Object
-
- net.bytebuddy.asm.Advice.Dispatcher.RelocationHandler.ForValue.Bound
-
- All Implemented Interfaces:
Advice.Dispatcher.RelocationHandler.Bound
- Enclosing class:
- Advice.Dispatcher.RelocationHandler.ForValue
@Enhance(includeSyntheticFields=true) protected class Advice.Dispatcher.RelocationHandler.ForValue.Bound extends java.lang.Object implements Advice.Dispatcher.RelocationHandler.Bound
A bound relocation handler forAdvice.Dispatcher.RelocationHandler.ForValue
.
-
-
Field Summary
Fields Modifier and Type Field Description private int
index
The array index of the relocated value.private MethodDescription
instrumentedMethod
The instrumented method.private boolean
inverted
true
if the relocation should be applied for any non-default value of a type.private Advice.Dispatcher.RelocationHandler.Relocation
relocation
The relocation to apply.-
Fields inherited from interface net.bytebuddy.asm.Advice.Dispatcher.RelocationHandler.Bound
NO_REQUIRED_SIZE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Bound(MethodDescription instrumentedMethod, Advice.Dispatcher.RelocationHandler.Relocation relocation, int index, boolean inverted)
Creates a new bound relocation handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, int offset)
Applies this relocation handler.
-
-
-
Field Detail
-
instrumentedMethod
private final MethodDescription instrumentedMethod
The instrumented method.
-
relocation
private final Advice.Dispatcher.RelocationHandler.Relocation relocation
The relocation to apply.
-
index
private final int index
The array index of the relocated value.
-
inverted
private final boolean inverted
true
if the relocation should be applied for any non-default value of a type.
-
-
Constructor Detail
-
Bound
protected Bound(MethodDescription instrumentedMethod, Advice.Dispatcher.RelocationHandler.Relocation relocation, int index, boolean inverted)
Creates a new bound relocation handler.- Parameters:
instrumentedMethod
- The instrumented method.relocation
- The relocation to apply.index
- The array index of the relocated value.inverted
-true
if the relocation should be applied for any non-default value of a type.
-
-
Method Detail
-
apply
public int apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, int offset)
Applies this relocation handler.- Specified by:
apply
in interfaceAdvice.Dispatcher.RelocationHandler.Bound
- Parameters:
methodVisitor
- The method visitor to use.implementationContext
- The implementation context to use.offset
- The offset of the relevant value.- Returns:
- The minimal required stack size to apply this relocation handler.
-
-