1
2
3
4
5
6
7
8 package it.imolinfo.jbi4corba.webservice.generator.bcm;
9
10 import it.imolinfo.jbi4corba.webservice.generator.InterfaceType;
11 import it.imolinfo.jbi4corba.webservice.generator.InterfaceTypeUtils;
12 import java.util.Map;
13
14 import org.objectweb.asm.ClassAdapter;
15 import org.objectweb.asm.ClassVisitor;
16 import org.objectweb.asm.MethodVisitor;
17 import org.objectweb.asm.Type;
18
19
20
21
22
23
24
25
26
27 public class InterfaceTypeClassAdapter extends ClassAdapter {
28
29 private Map<String, InterfaceType> opInterfaceTypes = null;
30 private static final String W3CEPR = Type
31 .getDescriptor(javax.xml.ws.wsaddressing.W3CEndpointReference.class);
32 private static final String W3CEPRA = Type
33 .getDescriptor(javax.xml.ws.wsaddressing.W3CEndpointReference[].class);
34
35
36
37
38
39
40
41
42 @Override
43 public MethodVisitor visitMethod(int access, String name, String desc,
44 String signature, String[] exceptions) {
45
46 if (!"<init>".equals(name)) {
47
48
49 if (desc != null) {
50 desc=InterfaceTypeUtils.changeInterfaceTypeDesc(desc, opInterfaceTypes);
51
52 }
53 }
54 return super.visitMethod(access, name, desc, signature, exceptions);
55 }
56
57
58
59
60
61
62
63 public InterfaceTypeClassAdapter(ClassVisitor arg0,
64 Map<String, InterfaceType> opIntTypes) {
65 super(arg0);
66 opInterfaceTypes = opIntTypes;
67 }
68 }