public static class Advice.MethodSizeHandler.Default extends Object implements Advice.MethodSizeHandler
| 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.NoOpUNDEFINED_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
Default(MethodDescription.InDefinedShape instrumentedMethod,
TypeList requiredTypes,
TypeList yieldedTypes)
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 |
bindEntry(MethodDescription.InDefinedShape adviceMethod)
Binds a method size handler for the entry 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 |
of(MethodDescription.InDefinedShape instrumentedMethod,
List<? extends TypeDescription> requiredTypes,
List<? extends TypeDescription> yieldedTypes,
int writerFlags)
Creates a method size handler applicable for the given instrumented method.
|
String |
toString() |
protected Default(MethodDescription.InDefinedShape instrumentedMethod, TypeList requiredTypes, TypeList yieldedTypes)
instrumentedMethod - The instrumented method.requiredTypes - The types this meta data handler expects to be available additionally to the instrumented method's parameters.yieldedTypes - The types that are expected to be added after the instrumented method returns.protected static Advice.MethodSizeHandler of(MethodDescription.InDefinedShape instrumentedMethod, List<? extends TypeDescription> requiredTypes, List<? extends TypeDescription> yieldedTypes, int writerFlags)
instrumentedMethod - The instrumented method.requiredTypes - The list of types that the instrumented method requires in addition to the method parameters.yieldedTypes - A list of types that are yielded by the instrumented method and available to the exit advice.writerFlags - The flags supplied to the ASM class writer.public Advice.MethodSizeHandler.ForAdvice bindEntry(MethodDescription.InDefinedShape adviceMethod)
Advice.MethodSizeHandlerbindEntry in interface Advice.MethodSizeHandleradviceMethod - The method representing the entry advice.public Advice.MethodSizeHandler.ForAdvice bindExit(MethodDescription.InDefinedShape adviceMethod, boolean skipThrowable)
Advice.MethodSizeHandlerbindExit in interface Advice.MethodSizeHandleradviceMethod - The method representing the exit advice.skipThrowable - true if the exit advice is not invoked on an exception.public int compoundStackSize(int stackSize)
Advice.MethodSizeHandlercompoundStackSize in interface Advice.MethodSizeHandlerstackSize - The required stack size of the instrumented method before translation.public int compoundLocalVariableLength(int localVariableLength)
Advice.MethodSizeHandlercompoundLocalVariableLength in interface Advice.MethodSizeHandlerlocalVariableLength - The required local variable array length of the instrumented method before translation.Copyright © 2014–2016. All rights reserved.