1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| package org.jboss.cache.marshall; |
8 |
| |
9 |
| import java.lang.reflect.Method; |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| |
18 |
| |
19 |
| |
20 |
| |
21 |
| |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| public class MethodCall extends org.jgroups.blocks.MethodCall |
27 |
| { |
28 |
| |
29 |
| |
30 |
| |
31 |
| private static final long serialVersionUID = -5316198032742449998L; |
32 |
| |
33 |
| private int methodIdInteger = -1; |
34 |
| |
35 |
0
| public MethodCall()
|
36 |
| { |
37 |
| |
38 |
| } |
39 |
| |
40 |
0
| protected MethodCall(Method method, Object... arguments)
|
41 |
| { |
42 |
0
| super(method, arguments);
|
43 |
| } |
44 |
| |
45 |
4502205
| protected MethodCall(Method method, int methodIdInteger, Object... arguments)
|
46 |
| { |
47 |
4502201
| super(method, arguments);
|
48 |
4502205
| this.methodIdInteger = methodIdInteger;
|
49 |
| } |
50 |
| |
51 |
0
| public void setMethodId(int id)
|
52 |
| { |
53 |
0
| methodIdInteger = id;
|
54 |
| } |
55 |
| |
56 |
43455123
| public int getMethodId()
|
57 |
| { |
58 |
43453643
| return methodIdInteger;
|
59 |
| } |
60 |
| |
61 |
0
| @Override
|
62 |
| public short getId() |
63 |
| { |
64 |
0
| throw new RuntimeException("Use of incorrect method! Are you sure you intend to do this instead of getMethodId()?!?");
|
65 |
| } |
66 |
| |
67 |
248
| public String toString()
|
68 |
| { |
69 |
248
| StringBuffer ret = new StringBuffer();
|
70 |
248
| boolean first = true;
|
71 |
248
| ret.append("MethodName: ");
|
72 |
248
| ret.append(method_name);
|
73 |
248
| ret.append("; MethodIdInteger: ");
|
74 |
248
| ret.append(methodIdInteger);
|
75 |
248
| ret.append("; Args: (");
|
76 |
248
| if (args != null)
|
77 |
| { |
78 |
248
| for (Object arg : args)
|
79 |
| { |
80 |
1081
| if (first)
|
81 |
| { |
82 |
248
| first = false;
|
83 |
| } |
84 |
| else |
85 |
| { |
86 |
833
| ret.append(", ");
|
87 |
| } |
88 |
1081
| ret.append(arg);
|
89 |
| } |
90 |
| } |
91 |
248
| ret.append(')');
|
92 |
248
| return ret.toString();
|
93 |
| |
94 |
| } |
95 |
| } |