| 1578 | |
| 1579 | |
| 1580 | private void registerWithArgs(String name, Object o, Class<?> cargs[]) { |
| 1581 | Class<?> c = o.getClass(); |
| 1582 | try { |
| 1583 | Method method = c.getMethod(name, cargs); |
| 1584 | synchronized (registerLock) { |
| 1585 | RegisteredMethods meth = registerMap.get(name); |
| 1586 | if (meth == null) { |
| 1587 | meth = new RegisteredMethods(); |
| 1588 | registerMap.put(name, meth); |
| 1589 | } |
| 1590 | meth.add(o, method); |
| 1591 | } |
| 1592 | } catch (NoSuchMethodException nsme) { |
| 1593 | die("There is no public " + name + "() method in the class " + |
| 1594 | o.getClass().getName()); |
| 1595 | |
| 1596 | } catch (Exception e) { |
| 1597 | die("Could not register " + name + " + () for " + o, e); |
| 1598 | } |
| 1599 | } |
| 1600 | |
| 1601 | |
| 1602 | // public void registerMethod(String methodName, Object target, Object... args) { |