public abstract static class Advice.Dispatcher.OffsetMapping.Target.ForExecutable extends Object implements Advice.Dispatcher.OffsetMapping.Target
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Advice.Dispatcher.OffsetMapping.Target.ForExecutable.ForConstructor
A constant for a
Constructor constant. |
protected static class |
Advice.Dispatcher.OffsetMapping.Target.ForExecutable.ForMethod
A constant for a
Method constant. |
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| Modifier and Type | Field and Description |
|---|---|
protected MethodDescription.InDefinedShape |
methodDescription
The method to represent as a constant.
|
NO_PADDING| Modifier | Constructor and Description |
|---|---|
protected |
ForExecutable(MethodDescription.InDefinedShape methodDescription)
Creates a new offset mapping for an executable constant.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
protected abstract int |
getAdditionalOffset()
Adds the additional required offset.
|
protected abstract String |
getInvokedMethod()
Returns the invoked method of the
Class API. |
protected abstract String |
getInvokedSignature()
Returns the signature of the invoked method.
|
int |
hashCode() |
protected abstract void |
loadMethodName(MethodVisitor methodVisitor)
Loads the method's name onto the operand stack if required.
|
static Advice.Dispatcher.OffsetMapping.Target |
of(MethodDescription.InDefinedShape methodDescription)
Resolves an appropriate target for an offset mapping that represents a constant for a method or constructor.
|
int |
resolveAccess(MethodVisitor methodVisitor,
int opcode)
Applies this offset mapping for a
MethodVisitor.visitVarInsn(int, int) instruction. |
int |
resolveIncrement(MethodVisitor methodVisitor,
int increment)
Applies this offset mapping for a
MethodVisitor.visitIincInsn(int, int) instruction. |
protected final MethodDescription.InDefinedShape methodDescription
protected ForExecutable(MethodDescription.InDefinedShape methodDescription)
methodDescription - The method to represent as a constant.public static Advice.Dispatcher.OffsetMapping.Target of(MethodDescription.InDefinedShape methodDescription)
methodDescription - The method description to represent as a constant.public int resolveAccess(MethodVisitor methodVisitor, int opcode)
Advice.Dispatcher.OffsetMapping.TargetMethodVisitor.visitVarInsn(int, int) instruction.resolveAccess in interface Advice.Dispatcher.OffsetMapping.TargetmethodVisitor - The method visitor onto which this offset mapping is to be applied.opcode - The opcode of the original instruction.protected abstract void loadMethodName(MethodVisitor methodVisitor)
methodVisitor - The method visitor to use.protected abstract String getInvokedMethod()
Class API.protected abstract String getInvokedSignature()
protected abstract int getAdditionalOffset()
public int resolveIncrement(MethodVisitor methodVisitor, int increment)
Advice.Dispatcher.OffsetMapping.TargetMethodVisitor.visitIincInsn(int, int) instruction.resolveIncrement in interface Advice.Dispatcher.OffsetMapping.TargetmethodVisitor - 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.