80 */ |
80 */ |
81 public synchronized Method getMethod() { |
81 public synchronized Method getMethod() { |
82 Method method = getMethod0(); |
82 Method method = getMethod0(); |
83 if (method == null) { |
83 if (method == null) { |
84 Class cls = getClass0(); |
84 Class cls = getClass0(); |
85 if (cls != null) { |
85 String name = getName(); |
|
86 if ((cls != null) && (name != null)) { |
86 Class[] params = getParams(); |
87 Class[] params = getParams(); |
87 if (params == null) { |
88 if (params == null) { |
88 for (int i = 0; i < 3; i++) { |
89 for (int i = 0; i < 3; i++) { |
89 // Find methods for up to 2 params. We are guessing here. |
90 // Find methods for up to 2 params. We are guessing here. |
90 // This block should never execute unless the classloader |
91 // This block should never execute unless the classloader |
91 // that loaded the argument classes disappears. |
92 // that loaded the argument classes disappears. |
92 method = Introspector.findMethod(cls, getName(), i, null); |
93 method = Introspector.findMethod(cls, name, i); |
93 if (method != null) { |
94 if (method != null) { |
94 break; |
95 break; |
95 } |
96 } |
96 } |
97 } |
97 } else { |
98 } else { |
98 method = Introspector.findMethod(cls, getName(), |
99 method = Statement.getMethod(cls, name, params); |
99 params.length, params); |
|
100 } |
100 } |
101 setMethod(method); |
101 setMethod(method); |
102 } |
102 } |
103 } |
103 } |
104 return method; |
104 return method; |