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.NoOp
UNDEFINED_SIZE
Modifier | Constructor and Description |
---|---|
protected |
Default(MethodDescription 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.ForInstrumentedMethod |
of(MethodDescription instrumentedMethod,
List<? extends TypeDescription> requiredTypes,
List<? extends TypeDescription> yieldedTypes,
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.
|
String |
toString() |
protected Default(MethodDescription 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.ForInstrumentedMethod of(MethodDescription 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.MethodSizeHandler.ForInstrumentedMethod
bindEntry
in interface Advice.MethodSizeHandler.ForInstrumentedMethod
adviceMethod
- The method representing the entry advice.public Advice.MethodSizeHandler.ForAdvice bindExit(MethodDescription.InDefinedShape adviceMethod, boolean skipThrowable)
Advice.MethodSizeHandler.ForInstrumentedMethod
bindExit
in interface Advice.MethodSizeHandler.ForInstrumentedMethod
adviceMethod
- 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.ForInstrumentedMethod
compoundStackSize
in interface Advice.MethodSizeHandler.ForInstrumentedMethod
stackSize
- The required stack size of the instrumented method before translation.public int compoundLocalVariableLength(int localVariableLength)
Advice.MethodSizeHandler.ForInstrumentedMethod
compoundLocalVariableLength
in interface Advice.MethodSizeHandler.ForInstrumentedMethod
localVariableLength
- The required local variable array length of the instrumented method before translation.public void requireLocalVariableLength(int localVariableLength)
Advice.MethodSizeHandler
requireLocalVariableLength
in interface Advice.MethodSizeHandler
localVariableLength
- The minimal required length of the local variable array.Copyright © 2014–2016. All rights reserved.