public class StackAwareMethodVisitor
extends org.objectweb.asm.MethodVisitor
| Constructor and Description |
|---|
StackAwareMethodVisitor(org.objectweb.asm.MethodVisitor methodVisitor,
MethodDescription instrumentedMethod)
Creates a new stack aware method visitor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
drainStack()
Pops all values currently on the stack.
|
int |
drainStack(int store,
int load,
StackSize size)
Drains the stack to only contain the top value.
|
void |
register(org.objectweb.asm.Label label,
List<StackSize> stackSizes)
Explicitly registers a label to define a given stack state.
|
void |
visitFieldInsn(int opcode,
String owner,
String name,
String descriptor) |
void |
visitInsn(int opcode) |
void |
visitIntInsn(int opcode,
int operand) |
void |
visitInvokeDynamicInsn(String name,
String descriptor,
org.objectweb.asm.Handle bootstrap,
Object... bootstrapArguments) |
void |
visitJumpInsn(int opcode,
org.objectweb.asm.Label label) |
void |
visitLabel(org.objectweb.asm.Label label) |
void |
visitLdcInsn(Object value) |
void |
visitLineNumber(int line,
org.objectweb.asm.Label start) |
void |
visitLookupSwitchInsn(org.objectweb.asm.Label defaultOption,
int[] key,
org.objectweb.asm.Label[] option) |
void |
visitMethodInsn(int opcode,
String owner,
String name,
String descriptor,
boolean isInterface) |
void |
visitMultiANewArrayInsn(String descriptor,
int dimension) |
void |
visitTableSwitchInsn(int minimum,
int maximum,
org.objectweb.asm.Label defaultOption,
org.objectweb.asm.Label... option) |
void |
visitTryCatchBlock(org.objectweb.asm.Label start,
org.objectweb.asm.Label end,
org.objectweb.asm.Label handler,
String type) |
void |
visitTypeInsn(int opcode,
String type) |
void |
visitVarInsn(int opcode,
int variable) |
visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFrame, visitIincInsn, visitInsnAnnotation, visitLocalVariable, visitLocalVariableAnnotation, visitMaxs, visitMethodInsn, visitParameter, visitParameterAnnotation, visitTryCatchAnnotation, visitTypeAnnotationpublic StackAwareMethodVisitor(org.objectweb.asm.MethodVisitor methodVisitor,
MethodDescription instrumentedMethod)
methodVisitor - The method visitor to delegate operations to.instrumentedMethod - The method description for which this method visitor is applied.public void drainStack()
public int drainStack(int store,
int load,
StackSize size)
store - The opcode used for storing the top value.load - The opcode used for loading the top value.size - The size of the value on top of the operand stack.public void register(org.objectweb.asm.Label label,
List<StackSize> stackSizes)
label - The label to register a stack state for.stackSizes - The stack sizes to assume when reaching the supplied label.public void visitInsn(int opcode)
visitInsn in class org.objectweb.asm.MethodVisitorpublic void visitIntInsn(int opcode,
int operand)
visitIntInsn in class org.objectweb.asm.MethodVisitorpublic void visitVarInsn(int opcode,
int variable)
visitVarInsn in class org.objectweb.asm.MethodVisitorpublic void visitTypeInsn(int opcode,
String type)
visitTypeInsn in class org.objectweb.asm.MethodVisitorpublic void visitFieldInsn(int opcode,
String owner,
String name,
String descriptor)
visitFieldInsn in class org.objectweb.asm.MethodVisitorpublic void visitMethodInsn(int opcode,
String owner,
String name,
String descriptor,
boolean isInterface)
visitMethodInsn in class org.objectweb.asm.MethodVisitorpublic void visitInvokeDynamicInsn(String name, String descriptor, org.objectweb.asm.Handle bootstrap, Object... bootstrapArguments)
visitInvokeDynamicInsn in class org.objectweb.asm.MethodVisitorpublic void visitLdcInsn(Object value)
visitLdcInsn in class org.objectweb.asm.MethodVisitorpublic void visitMultiANewArrayInsn(String descriptor, int dimension)
visitMultiANewArrayInsn in class org.objectweb.asm.MethodVisitorpublic void visitJumpInsn(int opcode,
org.objectweb.asm.Label label)
visitJumpInsn in class org.objectweb.asm.MethodVisitorpublic void visitLabel(org.objectweb.asm.Label label)
visitLabel in class org.objectweb.asm.MethodVisitorpublic void visitLineNumber(int line,
org.objectweb.asm.Label start)
visitLineNumber in class org.objectweb.asm.MethodVisitorpublic void visitTableSwitchInsn(int minimum,
int maximum,
org.objectweb.asm.Label defaultOption,
org.objectweb.asm.Label... option)
visitTableSwitchInsn in class org.objectweb.asm.MethodVisitorpublic void visitLookupSwitchInsn(org.objectweb.asm.Label defaultOption,
int[] key,
org.objectweb.asm.Label[] option)
visitLookupSwitchInsn in class org.objectweb.asm.MethodVisitorpublic void visitTryCatchBlock(org.objectweb.asm.Label start,
org.objectweb.asm.Label end,
org.objectweb.asm.Label handler,
String type)
visitTryCatchBlock in class org.objectweb.asm.MethodVisitorCopyright © 2014–2019. All rights reserved.