protected static class Advice.Dispatcher.OffsetMapping.Target.ForParameter.ReadWrite extends Advice.Dispatcher.OffsetMapping.Target.ForParameter
Modifier and Type | Class and Description |
---|---|
protected static class |
Advice.Dispatcher.OffsetMapping.Target.ForParameter.ReadWrite.WithCasting
A readable and writable parameter mapping where the assigned value is casted to another type prior to assignment.
|
Advice.Dispatcher.OffsetMapping.Target.ForParameter.ReadOnly, Advice.Dispatcher.OffsetMapping.Target.ForParameter.ReadWrite
Advice.Dispatcher.OffsetMapping.Target.ForBoxedArgument, Advice.Dispatcher.OffsetMapping.Target.ForBoxedArguments, Advice.Dispatcher.OffsetMapping.Target.ForBoxedDefaultValue, Advice.Dispatcher.OffsetMapping.Target.ForConstantPoolValue, Advice.Dispatcher.OffsetMapping.Target.ForDefaultValue, Advice.Dispatcher.OffsetMapping.Target.ForExecutable, Advice.Dispatcher.OffsetMapping.Target.ForField, Advice.Dispatcher.OffsetMapping.Target.ForNullConstant, Advice.Dispatcher.OffsetMapping.Target.ForParameter, Advice.Dispatcher.OffsetMapping.Target.ForSerializedObject, Advice.Dispatcher.OffsetMapping.Target.ForType, Advice.Dispatcher.OffsetMapping.Target.PrimitiveDispatcher
offset
NO_PADDING
Modifier | Constructor and Description |
---|---|
protected |
ReadWrite(int offset)
Creates a new parameter mapping that is both readable and writable.
|
Modifier and Type | Method and Description |
---|---|
protected Advice.Dispatcher.OffsetMapping.Target |
casted(TypeDescription targetType)
Resolves a parameter mapping where the value is casted to the given type prior to assignment.
|
protected void |
onWrite(MethodVisitor methodVisitor,
int opcode)
Invoked upon attempting to write to a parameter.
|
int |
resolveIncrement(MethodVisitor methodVisitor,
int increment)
Applies this offset mapping for a
MethodVisitor.visitIincInsn(int, int) instruction. |
String |
toString() |
equals, hashCode, resolveAccess
protected ReadWrite(int offset)
offset
- The mapped offset.protected void onWrite(MethodVisitor methodVisitor, int opcode)
Advice.Dispatcher.OffsetMapping.Target.ForParameter
onWrite
in class Advice.Dispatcher.OffsetMapping.Target.ForParameter
methodVisitor
- The method visitor onto which this offset mapping is to be applied.opcode
- The applied opcode.protected Advice.Dispatcher.OffsetMapping.Target casted(TypeDescription targetType)
targetType
- The type to which the target value is cased.public int resolveIncrement(MethodVisitor methodVisitor, int increment)
Advice.Dispatcher.OffsetMapping.Target
MethodVisitor.visitIincInsn(int, int)
instruction.methodVisitor
- The method visitor onto which this offset mapping is to be applied.increment
- The value with which to increment the targeted value.Copyright © 2014–2016. All rights reserved.