1 package net.sf.cglib.transform;
2
3 import org.objectweb.asm.Attribute;
4 import org.objectweb.asm.CodeVisitor;
5 import org.objectweb.asm.Label;
6
7 public class CodeVisitorTee implements CodeVisitor {
8 private CodeVisitor cv1, cv2;
9
10 public CodeVisitorTee(CodeVisitor cv1, CodeVisitor cv2) {
11 this.cv1 = cv1;
12 this.cv2 = cv2;
13 }
14
15 public void visitFieldInsn(int opcode, String owner, String name, String desc) {
16 cv1.visitFieldInsn(opcode, owner, name, desc);
17 cv2.visitFieldInsn(opcode, owner, name, desc);
18 }
19
20 public void visitIincInsn(int var, int increment) {
21 cv1.visitIincInsn(var, increment);
22 cv2.visitIincInsn(var, increment);
23 }
24
25 public void visitInsn(int opcode) {
26 cv1.visitInsn(opcode);
27 cv2.visitInsn(opcode);
28 }
29
30 public void visitIntInsn(int opcode, int operand) {
31 cv1.visitIntInsn(opcode, operand);
32 cv2.visitIntInsn(opcode, operand);
33 }
34
35 public void visitJumpInsn(int opcode, Label label) {
36 cv1.visitJumpInsn(opcode, label);
37 cv2.visitJumpInsn(opcode, label);
38 }
39
40 public void visitLabel(Label label) {
41 cv1.visitLabel(label);
42 cv2.visitLabel(label);
43 }
44
45 public void visitLdcInsn(Object cst) {
46 cv1.visitLdcInsn(cst);
47 cv2.visitLdcInsn(cst);
48 }
49
50 public void visitLineNumber(int line, Label start) {
51 cv1.visitLineNumber(line, start);
52 cv2.visitLineNumber(line, start);
53 }
54
55 public void visitLocalVariable(String name, String desc, Label start, Label end, int index) {
56 cv1.visitLocalVariable(name, desc, start, end, index);
57 cv2.visitLocalVariable(name, desc, start, end, index);
58 }
59
60 public void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels) {
61 cv1.visitLookupSwitchInsn(dflt, keys, labels);
62 cv2.visitLookupSwitchInsn(dflt, keys, labels);
63 }
64
65 public void visitMaxs(int maxStack, int maxLocals) {
66 cv1.visitMaxs(maxStack, maxLocals);
67 cv2.visitMaxs(maxStack, maxLocals);
68 }
69
70 public void visitMethodInsn(int opcode, String owner, String name, String desc) {
71 cv1.visitMethodInsn(opcode, owner, name, desc);
72 cv2.visitMethodInsn(opcode, owner, name, desc);
73 }
74
75 public void visitMultiANewArrayInsn(String desc, int dims) {
76 cv1.visitMultiANewArrayInsn(desc, dims);
77 cv2.visitMultiANewArrayInsn(desc, dims);
78 }
79
80 public void visitTableSwitchInsn(int min, int max, Label dflt, Label[] labels) {
81 cv1.visitTableSwitchInsn(min, max, dflt, labels);
82 cv2.visitTableSwitchInsn(min, max, dflt, labels);
83 }
84
85 public void visitTryCatchBlock(Label start, Label end, Label handler, String type) {
86 cv1.visitTryCatchBlock(start, end, handler, type);
87 cv2.visitTryCatchBlock(start, end, handler, type);
88 }
89
90 public void visitTypeInsn(int opcode, String desc) {
91 cv1.visitTypeInsn(opcode, desc);
92 cv2.visitTypeInsn(opcode, desc);
93 }
94
95 public void visitVarInsn(int opcode, int var) {
96 cv1.visitVarInsn(opcode, var);
97 cv2.visitVarInsn(opcode, var);
98 }
99
100 public void visitAttribute(Attribute attrs) {
101 cv1.visitAttribute(attrs);
102 cv2.visitAttribute(attrs);
103 }
104 }
105
This page was automatically generated by Maven