MCPcopy Index your code
hub / github.com/processing/processing / registerWithArgs

Method registerWithArgs

core/src/processing/core/PApplet.java:1580–1599  ·  view source on GitHub ↗
(String name, Object o, Class<?> cargs[])

Source from the content-addressed store, hash-verified

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) {

Callers 1

registerMethodMethod · 0.95

Calls 6

addMethod · 0.95
dieMethod · 0.95
getMethodMethod · 0.80
getMethod · 0.65
putMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected