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

Method registerNoArgs

core/src/processing/core/PApplet.java:1558–1577  ·  view source on GitHub ↗
(String name, Object o)

Source from the content-addressed store, hash-verified

1556
1557
1558 private void registerNoArgs(String name, Object o) {
1559 Class<?> c = o.getClass();
1560 try {
1561 Method method = c.getMethod(name);
1562 synchronized (registerLock) {
1563 RegisteredMethods meth = registerMap.get(name);
1564 if (meth == null) {
1565 meth = new RegisteredMethods();
1566 registerMap.put(name, meth);
1567 }
1568 meth.add(o, method);
1569 }
1570 } catch (NoSuchMethodException nsme) {
1571 die("There is no public " + name + "() method in the class " +
1572 o.getClass().getName());
1573
1574 } catch (Exception e) {
1575 die("Could not register " + name + " + () for " + o, e);
1576 }
1577 }
1578
1579
1580 private void registerWithArgs(String name, Object o, Class<?> cargs[]) {

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