public abstract static class Advice.MethodSizeHandler.Default extends Object implements Advice.MethodSizeHandler.ForInstrumentedMethod
| Modifier and Type | Class and Description |
|---|---|
protected class |
Advice.MethodSizeHandler.Default.ForAdvice
A method size handler for an advice method.
|
protected static class |
Advice.MethodSizeHandler.Default.WithCopiedArguments
A method size handler that expects that the original arguments were copied.
|
protected static class |
Advice.MethodSizeHandler.Default.WithRetainedArguments
A method size handler that expects that the original arguments are retained.
|
Advice.MethodSizeHandler.Default, Advice.MethodSizeHandler.ForInstrumentedMethod, Advice.MethodSizeHandler.NoOp| Modifier and Type | Field and Description |
|---|---|
protected List<? extends TypeDescription> |
initialTypes
A list of virtual method arguments that are explicitly added before any code execution.
|
protected MethodDescription |
instrumentedMethod
The instrumented method.
|
protected int |
localVariableLength
The maximum length of the local variable array required by a visited advice method.
|
protected List<? extends TypeDescription> |
postMethodTypes
A list of virtual method arguments that are available after the instrumented method has completed.
|
protected List<? extends TypeDescription> |
preMethodTypes
A list of virtual method arguments that are available before the instrumented method is executed.
|
protected int |
stackSize
The maximum stack size required by a visited advice method.
|
UNDEFINED_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
Default(MethodDescription instrumentedMethod,
List<? extends TypeDescription> initialTypes,
List<? extends TypeDescription> preMethodTypes,
List<? extends TypeDescription> postMethodTypes)
Creates a new default meta data handler that recomputes the space requirements of an instrumented method.
|
| Modifier and Type | Method and Description |
|---|---|
Advice.MethodSizeHandler.ForAdvice |
bindEnter(MethodDescription.TypeToken typeToken)
Binds a method size handler for the enter advice.
|
int |
compoundLocalVariableLength(int localVariableLength)
Computes a compound local variable array length for the advice and the translated instrumented method.
|
int |
compoundStackSize(int stackSize)
Computes a compound stack size for the advice and the translated instrumented method.
|
protected static Advice.MethodSizeHandler.ForInstrumentedMethod |
of(MethodDescription instrumentedMethod,
List<? extends TypeDescription> initialTypes,
List<? extends TypeDescription> preMethodTypes,
List<? extends TypeDescription> postMethodTypes,
boolean copyArguments,
int writerFlags)
Creates a method size handler applicable for the given instrumented method.
|
void |
requireLocalVariableLength(int localVariableLength)
Requires a minimum length of the local variable array.
|
void |
requireStackSize(int stackSize)
Records a minimum stack size required by the represented advice method.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbindExitprotected final MethodDescription instrumentedMethod
protected final List<? extends TypeDescription> initialTypes
protected final List<? extends TypeDescription> preMethodTypes
protected final List<? extends TypeDescription> postMethodTypes
protected int stackSize
protected int localVariableLength
protected Default(MethodDescription instrumentedMethod, List<? extends TypeDescription> initialTypes, List<? extends TypeDescription> preMethodTypes, List<? extends TypeDescription> postMethodTypes)
instrumentedMethod - The instrumented method.initialTypes - A list of virtual method arguments that are explicitly added before any code execution.preMethodTypes - A list of virtual method arguments that are available before the instrumented method is executed.postMethodTypes - A list of virtual method arguments that are available after the instrumented method has completed.protected static Advice.MethodSizeHandler.ForInstrumentedMethod of(MethodDescription instrumentedMethod, List<? extends TypeDescription> initialTypes, List<? extends TypeDescription> preMethodTypes, List<? extends TypeDescription> postMethodTypes, boolean copyArguments, int writerFlags)
instrumentedMethod - The instrumented method.initialTypes - A list of virtual method arguments that are explicitly added before any code execution.preMethodTypes - A list of virtual method arguments that are available before the instrumented method is executed.postMethodTypes - A list of virtual method arguments that are available after the instrumented method has completed.copyArguments - true if the original arguments are copied before invoking the instrumented method.writerFlags - The flags supplied to the ASM class writer.public Advice.MethodSizeHandler.ForAdvice bindEnter(MethodDescription.TypeToken typeToken)
bindEnter in interface Advice.MethodSizeHandler.ForInstrumentedMethodtypeToken - The type token representing the enter advice.public void requireStackSize(int stackSize)
requireStackSize in interface Advice.MethodSizeHandlerstackSize - The minimum size required by the represented advice method.public void requireLocalVariableLength(int localVariableLength)
requireLocalVariableLength in interface Advice.MethodSizeHandlerlocalVariableLength - The minimal required length of the local variable array.public int compoundStackSize(int stackSize)
compoundStackSize in interface Advice.MethodSizeHandler.ForInstrumentedMethodstackSize - The required stack size of the instrumented method before translation.public int compoundLocalVariableLength(int localVariableLength)
compoundLocalVariableLength in interface Advice.MethodSizeHandler.ForInstrumentedMethodlocalVariableLength - The required local variable array length of the instrumented method before translation.Copyright © 2014–2025. All rights reserved.