01: package net.sourceforge.orbroker;
02:
03: import java.lang.reflect.Method;
04:
05: import net.kildenpedersen.reflect.Reflector;
06:
07: /*
08: * Created on Mar 22, 2004
09: */
10:
11: /**
12: *
13: * @author Nils Kilden-Pedersen
14: */
15: final class SetMethod extends SetterMethod {
16:
17: private static Method findMethod(Class type, String name,
18: ArgumentList parameters) {
19: Method method = Reflector.getAccessibleMethod(type, name,
20: parameters.getArgumentTypes());
21: if (method == null) {
22: String msg = "Unknown method "
23: + Reflector.getClassName(type) + "." + name
24: + parameters.toString();
25: throw new ConfigurationException(msg);
26: }
27: return method;
28: }
29:
30: SetMethod(Class resultObjectType, String methodName,
31: ArgumentList parameterList) {
32: super(findMethod(resultObjectType, methodName, parameterList));
33: super.setArgumentList(parameterList);
34: }
35: }
|