public 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.
|
Advice.MethodSizeHandler.Default, Advice.MethodSizeHandler.ForInstrumentedMethod, Advice.MethodSizeHandler.NoOpUNDEFINED_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
Default(MethodDescription instrumentedMethod,
List<? extends TypeDescription> enterTypes,
List<? extends TypeDescription> intermediateTypes,
List<? extends TypeDescription> exitTypes)
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.InDefinedShape adviceMethod)
Binds a method size handler for the enter advice.
|
Advice.MethodSizeHandler.ForAdvice |
bindExit(MethodDescription.InDefinedShape adviceMethod,
boolean skipThrowable)
Binds the method size handler for the exit 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> enterTypes,
List<? extends TypeDescription> intermediateTypes,
List<? extends TypeDescription> exitTypes,
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.
|
protected Default(MethodDescription instrumentedMethod, List<? extends TypeDescription> enterTypes, List<? extends TypeDescription> intermediateTypes, List<? extends TypeDescription> exitTypes)
instrumentedMethod - The instrumented method.enterTypes - A list of virtual method arguments that are available before the instrumented method is executed.intermediateTypes - A list of virtual method arguments that are available are synthetically added the instrumented method is executed.exitTypes - 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> enterTypes, List<? extends TypeDescription> intermediateTypes, List<? extends TypeDescription> exitTypes, int writerFlags)
instrumentedMethod - The instrumented method.enterTypes - A list of virtual method arguments that are available before the instrumented method is executed.intermediateTypes - A list of virtual method arguments that are available are synthetically added the instrumented method is executed.exitTypes - A list of virtual method arguments that are available after the instrumented method has completed.writerFlags - The flags supplied to the ASM class writer.public Advice.MethodSizeHandler.ForAdvice bindEnter(MethodDescription.InDefinedShape adviceMethod)
Advice.MethodSizeHandler.ForInstrumentedMethodbindEnter in interface Advice.MethodSizeHandler.ForInstrumentedMethodadviceMethod - The method representing the enter advice.public Advice.MethodSizeHandler.ForAdvice bindExit(MethodDescription.InDefinedShape adviceMethod, boolean skipThrowable)
Advice.MethodSizeHandler.ForInstrumentedMethodbindExit in interface Advice.MethodSizeHandler.ForInstrumentedMethodadviceMethod - The method representing the exit advice.skipThrowable - true if the exit advice is not invoked on an exception.public int compoundStackSize(int stackSize)
Advice.MethodSizeHandler.ForInstrumentedMethodcompoundStackSize in interface Advice.MethodSizeHandler.ForInstrumentedMethodstackSize - The required stack size of the instrumented method before translation.public int compoundLocalVariableLength(int localVariableLength)
Advice.MethodSizeHandler.ForInstrumentedMethodcompoundLocalVariableLength in interface Advice.MethodSizeHandler.ForInstrumentedMethodlocalVariableLength - The required local variable array length of the instrumented method before translation.public void requireStackSize(int stackSize)
Advice.MethodSizeHandlerrequireStackSize in interface Advice.MethodSizeHandlerstackSize - The minimum size required by the represented advice method.public void requireLocalVariableLength(int localVariableLength)
Advice.MethodSizeHandlerrequireLocalVariableLength in interface Advice.MethodSizeHandlerlocalVariableLength - The minimal required length of the local variable array.Copyright © 2014–2018. All rights reserved.