@NotThreadSafe public final class InstructionGroupHasher extends MethodVisitor
InstructionGroup
Not very pretty, that one.
The only entry point, hash(InstructionGroup, String)
, will hash
the entire instructions and field out of the instruction group, then set
the name of the instruction group appropriately.
InstructionGroupPreparer
api, mv
Modifier and Type | Method and Description |
---|---|
static void |
hash(InstructionGroup group,
String className)
Generate a hash of the group, use it to name it
|
void |
visitFieldInsn(int opcode,
String owner,
String name,
String desc) |
void |
visitIincInsn(int var,
int increment) |
void |
visitInsn(int opcode) |
void |
visitIntInsn(int opcode,
int operand) |
void |
visitJumpInsn(int opcode,
Label label) |
void |
visitLabel(Label label) |
void |
visitLdcInsn(Object cst) |
void |
visitLookupSwitchInsn(Label dflt,
int[] keys,
Label[] labels) |
void |
visitMethodInsn(int opcode,
String owner,
String name,
String desc,
boolean itf) |
void |
visitMultiANewArrayInsn(String desc,
int dims) |
void |
visitTableSwitchInsn(int min,
int max,
Label dflt,
Label... labels) |
void |
visitTryCatchBlock(Label start,
Label end,
Label handler,
String type) |
void |
visitTypeInsn(int opcode,
String type) |
void |
visitVarInsn(int opcode,
int var) |
visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFrame, visitInsnAnnotation, visitInvokeDynamicInsn, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitMaxs, visitMethodInsn, visitParameter, visitParameterAnnotation, visitTryCatchAnnotation, visitTypeAnnotation
public static void hash(@Nonnull InstructionGroup group, @Nonnull String className)
group
- the instruction groupclassName
- this group's parent class namepublic void visitInsn(int opcode)
visitInsn
in class MethodVisitor
public void visitIntInsn(int opcode, int operand)
visitIntInsn
in class MethodVisitor
public void visitVarInsn(int opcode, int var)
visitVarInsn
in class MethodVisitor
public void visitTypeInsn(int opcode, String type)
visitTypeInsn
in class MethodVisitor
public void visitFieldInsn(int opcode, String owner, String name, String desc)
visitFieldInsn
in class MethodVisitor
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf)
visitMethodInsn
in class MethodVisitor
public void visitJumpInsn(int opcode, Label label)
visitJumpInsn
in class MethodVisitor
public void visitLabel(Label label)
visitLabel
in class MethodVisitor
public void visitLdcInsn(Object cst)
visitLdcInsn
in class MethodVisitor
public void visitIincInsn(int var, int increment)
visitIincInsn
in class MethodVisitor
public void visitTableSwitchInsn(int min, int max, Label dflt, Label... labels)
visitTableSwitchInsn
in class MethodVisitor
public void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels)
visitLookupSwitchInsn
in class MethodVisitor
public void visitMultiANewArrayInsn(String desc, int dims)
visitMultiANewArrayInsn
in class MethodVisitor
public void visitTryCatchBlock(Label start, Label end, Label handler, String type)
visitTryCatchBlock
in class MethodVisitor