public abstract static class Advice.StackMapFrameHandler.Default extends Object implements Advice.StackMapFrameHandler.ForInstrumentedMethod
| Modifier and Type | Class and Description | 
|---|---|
| protected class  | Advice.StackMapFrameHandler.Default.ForAdviceA stack map frame handler for an advice method. | 
| protected static class  | Advice.StackMapFrameHandler.Default.InitializationRepresents the initialization state of a stack value that can either be initialized or uninitialized. | 
| protected static class  | Advice.StackMapFrameHandler.Default.TranslationModeA translation mode that determines how the fixed frames of the instrumented method are written. | 
| protected static class  | Advice.StackMapFrameHandler.Default.TrivialA trivial stack map frame handler that applies a trivial translation for the instrumented method's stack map frames. | 
| protected static class  | Advice.StackMapFrameHandler.Default.WithPreservedArgumentsA stack map frame handler that requires the original arguments of the instrumented method to be preserved in their original form. | 
Advice.StackMapFrameHandler.Default, Advice.StackMapFrameHandler.ForInstrumentedMethod, Advice.StackMapFrameHandler.ForPostProcessor, Advice.StackMapFrameHandler.NoOp| Modifier and Type | Field and Description | 
|---|---|
| protected int | currentFrameDivergenceThe current frame's size divergence from the original local variable array. | 
| protected static Object[] | EMPTYAn empty array indicating an empty frame. | 
| protected boolean | expandFramestrueif the meta data handler is expected to expand its frames. | 
| protected List<? extends TypeDescription> | initialTypesA list of virtual method arguments that are explicitly added before any code execution. | 
| protected MethodDescription | instrumentedMethodThe instrumented method. | 
| protected TypeDescription | instrumentedTypeThe instrumented type. | 
| protected List<? extends TypeDescription> | latentTypesA list of virtual arguments that are available after the enter advice method is executed. | 
| protected List<? extends TypeDescription> | postMethodTypesA list of virtual method arguments that are available after the instrumented method has completed. | 
| protected List<? extends TypeDescription> | preMethodTypesA list of virtual method arguments that are available before the instrumented method is executed. | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | Default(TypeDescription instrumentedType,
       MethodDescription instrumentedMethod,
       List<? extends TypeDescription> initialTypes,
       List<? extends TypeDescription> latentTypes,
       List<? extends TypeDescription> preMethodTypes,
       List<? extends TypeDescription> postMethodTypes,
       boolean expandFrames)Creates a new default stack map frame handler. | 
| Modifier and Type | Method and Description | 
|---|---|
| Advice.StackMapFrameHandler.ForAdvice | bindEnter(MethodDescription.TypeToken typeToken)Binds this metadata handler for the enter advice. | 
| int | getReaderHint()Returns a hint to supply to a  ClassReaderwhen parsing an advice method. | 
| protected void | injectFullFrame(MethodVisitor methodVisitor,
               Advice.StackMapFrameHandler.Default.Initialization initialization,
               List<? extends TypeDescription> typesInArray,
               List<? extends TypeDescription> typesOnStack)Injects a full stack map frame after the instrumented method has completed. | 
| protected static Advice.StackMapFrameHandler.ForInstrumentedMethod | of(TypeDescription instrumentedType,
  MethodDescription instrumentedMethod,
  List<? extends TypeDescription> initialTypes,
  List<? extends TypeDescription> latentTypes,
  List<? extends TypeDescription> preMethodTypes,
  List<? extends TypeDescription> postMethodTypes,
  boolean exitAdvice,
  boolean copyArguments,
  ClassFileVersion classFileVersion,
  int writerFlags,
  int readerFlags)Creates an appropriate stack map frame handler for an instrumented method. | 
| protected void | translateFrame(MethodVisitor methodVisitor,
              Advice.StackMapFrameHandler.Default.TranslationMode translationMode,
              boolean isStatic,
              MethodDescription.TypeToken typeToken,
              List<? extends TypeDescription> additionalTypes,
              int type,
              int localVariableLength,
              Object[] localVariable,
              int stackSize,
              Object[] stack)Translates a frame. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbindExit, injectInitializationFrame, injectPostCompletionFrame, injectStartFrameinjectCompletionFrame, injectExceptionFrame, injectReturnFrame, translateFrameprotected static final Object[] EMPTY
protected final TypeDescription instrumentedType
protected final MethodDescription instrumentedMethod
protected final List<? extends TypeDescription> initialTypes
protected final List<? extends TypeDescription> latentTypes
protected final List<? extends TypeDescription> preMethodTypes
protected final List<? extends TypeDescription> postMethodTypes
protected final boolean expandFrames
true if the meta data handler is expected to expand its frames.protected int currentFrameDivergence
protected Default(TypeDescription instrumentedType, MethodDescription instrumentedMethod, List<? extends TypeDescription> initialTypes, List<? extends TypeDescription> latentTypes, List<? extends TypeDescription> preMethodTypes, List<? extends TypeDescription> postMethodTypes, boolean expandFrames)
instrumentedType - The instrumented type.instrumentedMethod - The instrumented method.initialTypes - A list of virtual method arguments that are explicitly added before any code execution.latentTypes - A list of virtual arguments that are available after the enter advice method is executed.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.expandFrames - true if the meta data handler is expected to expand its frames.protected static Advice.StackMapFrameHandler.ForInstrumentedMethod of(TypeDescription instrumentedType, MethodDescription instrumentedMethod, List<? extends TypeDescription> initialTypes, List<? extends TypeDescription> latentTypes, List<? extends TypeDescription> preMethodTypes, List<? extends TypeDescription> postMethodTypes, boolean exitAdvice, boolean copyArguments, ClassFileVersion classFileVersion, int writerFlags, int readerFlags)
instrumentedType - The instrumented type.instrumentedMethod - The instrumented method.initialTypes - A list of virtual method arguments that are explicitly added before any code execution.latentTypes - A list of virtual arguments that are available after the enter advice method is executed.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.exitAdvice - true if the current advice implies exit advice.copyArguments - true if the original arguments are copied before invoking the instrumented method.classFileVersion - The instrumented type's class file version.writerFlags - The flags supplied to the ASM writer.readerFlags - The reader flags supplied to the ASM reader.public Advice.StackMapFrameHandler.ForAdvice bindEnter(MethodDescription.TypeToken typeToken)
bindEnter in interface Advice.StackMapFrameHandler.ForInstrumentedMethodtypeToken - The type token representing the advice method.public int getReaderHint()
ClassReader when parsing an advice method.getReaderHint in interface Advice.StackMapFrameHandler.ForInstrumentedMethodprotected void translateFrame(MethodVisitor methodVisitor, Advice.StackMapFrameHandler.Default.TranslationMode translationMode, boolean isStatic, MethodDescription.TypeToken typeToken, List<? extends TypeDescription> additionalTypes, int type, int localVariableLength, @MaybeNull Object[] localVariable, int stackSize, @MaybeNull Object[] stack)
methodVisitor - The method visitor to write the frame to.translationMode - The translation mode to apply.isStatic - true if the targeted type token represents a static method.typeToken - A type token for the method description for which the frame is written.additionalTypes - The additional types to consider part of the instrumented method's parameters.type - The frame's type.localVariableLength - The local variable length.localVariable - An array containing the types of the current local variables.stackSize - The size of the operand stack.stack - An array containing the types of the current operand stack.protected void injectFullFrame(MethodVisitor methodVisitor, Advice.StackMapFrameHandler.Default.Initialization initialization, List<? extends TypeDescription> typesInArray, List<? extends TypeDescription> typesOnStack)
methodVisitor - The method visitor onto which to write the stack map frame.initialization - The initialization to apply when resolving a reference to the instance on which a non-static method is invoked.typesInArray - The types that were added to the local variable array additionally to the values of the instrumented method.typesOnStack - The types currently on the operand stack.Copyright © 2014–2025. All rights reserved.