1
2
3
4
5
6
7
8 package it.imolinfo.jbi4corba.webservice.generator;
9
10 import java.lang.reflect.Method;
11 import java.util.ArrayList;
12 import java.util.HashSet;
13 import java.util.List;
14 import java.util.Set;
15
16 import org.apache.commons.lang.builder.EqualsBuilder;
17 import org.apache.commons.lang.builder.ReflectionToStringBuilder;
18
19
20
21
22 public class MethodSignature {
23
24
25
26
27 private String methodName = null;
28
29
30
31
32
33 private String returnType = null;
34
35
36
37
38 private String returnName = null;
39
40
41
42
43
44 private List<Param> parameters = new ArrayList<Param>();
45
46
47
48
49
50 private List<String> exceptionsType = new ArrayList<String>();
51
52
53
54
55 private boolean oneway = false;
56
57
58
59
60 private boolean containsHolder = false;
61
62
63 private String className = null;
64
65
66 private Class classType = null;
67
68
69 private Method method = null;
70
71
72 private Method changedMethod = null;
73
74 private Set<String> methodUnionTypes =new HashSet<String>();
75
76
77 private Set<String> methodInterfaceTypes=new HashSet<String>();
78
79 private Set<String> methodAnyTypes=new HashSet<String>();
80
81
82
83
84 public MethodSignature() {
85
86 }
87
88
89
90
91
92
93 public String toString() {
94 return ReflectionToStringBuilder.toString(this);
95 }
96
97
98
99
100
101 public boolean equals(Object obj) {
102 return EqualsBuilder.reflectionEquals(this, obj);
103 }
104
105
106
107
108
109
110
111
112 public String getMethodName() {
113 return methodName;
114 }
115
116
117
118
119
120
121 public void setMethodName(String methodName) {
122 this.methodName = methodName;
123 }
124
125
126
127
128
129
130 public String getReturnType() {
131 return returnType;
132 }
133
134
135
136
137
138
139 public void setReturnType(String returnType) {
140 this.returnType = returnType;
141 }
142
143
144
145
146
147
148 public String getReturnName() {
149 return returnName;
150 }
151
152
153
154
155
156
157 public void setReturnName(String returnName) {
158 this.returnName = returnName;
159 }
160
161
162
163
164
165
166 public List<String> getExceptionsType() {
167 return exceptionsType;
168 }
169
170
171
172
173
174 public void setExceptionsType(List<String> exceptionsType) {
175 this.exceptionsType = exceptionsType;
176 }
177
178
179
180
181
182
183 public boolean isOneway() {
184 return oneway;
185 }
186
187
188
189
190
191
192 public void setOneway(boolean oneway) {
193 this.oneway = oneway;
194 }
195
196 public List<Param> getParameters() {
197 return parameters;
198 }
199
200 public void setParameters(List<Param> parameters) {
201 this.parameters = parameters;
202 }
203
204 public boolean isContainsHolder() {
205 return containsHolder;
206 }
207
208 public void setContainsHolder(boolean containsHolder) {
209 this.containsHolder = containsHolder;
210 }
211
212 public String getClassName() {
213 return className;
214 }
215
216 public void setClassName(String classNameStr) {
217 this.className = classNameStr;
218 }
219
220 public Class getClassType() {
221 return classType;
222 }
223
224 public void setClassType(Class classType) {
225 this.classType = classType;
226 }
227
228 public Method getMethod() {
229 return method;
230 }
231
232 public void setMethod(Method method) {
233 this.method = method;
234 }
235
236 public Method getChangedMethod() {
237 return changedMethod;
238 }
239
240 public void setChangedMethod(Method changedMethod) {
241 this.changedMethod = changedMethod;
242 }
243
244 public Set<String> getMethodUnionTypes() {
245 return methodUnionTypes;
246 }
247
248 public void setMethodUnionTypes(Set<String> methodUnionTypes) {
249 this.methodUnionTypes = methodUnionTypes;
250 }
251
252 public Set<String> getMethodInterfaceTypes() {
253 return methodInterfaceTypes;
254 }
255
256 public void setMethodInterfaceTypes(Set<String> methodInterfaceTypes) {
257 this.methodInterfaceTypes = methodInterfaceTypes;
258 }
259
260 public Set<String> getMethodAnyTypes() {
261 return methodInterfaceTypes;
262 }
263
264 public void setMethodAnyTypes(Set<String> methodInterfaceTypes) {
265 this.methodInterfaceTypes = methodInterfaceTypes;
266 }
267
268
269 public boolean hasCorbaTypes()
270 {
271
272 if (!methodInterfaceTypes.isEmpty() || !methodUnionTypes.isEmpty() || !methodAnyTypes.isEmpty())
273 return true;
274 return false;
275 }
276
277 }