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

Method add

core/src/processing/core/PApplet.java:1459–1476  ·  view source on GitHub ↗
(Object object, Method method)

Source from the content-addressed store, hash-verified

1457
1458
1459 void add(Object object, Method method) {
1460 if (findIndex(object) == -1) {
1461 if (objects == null) {
1462 objects = new Object[5];
1463 methods = new Method[5];
1464
1465 } else if (count == objects.length) {
1466 objects = (Object[]) PApplet.expand(objects);
1467 methods = (Method[]) PApplet.expand(methods);
1468 }
1469 objects[count] = object;
1470 methods[count] = method;
1471 count++;
1472 } else {
1473 die(method.getName() + "() already added for this instance of " +
1474 object.getClass().getName());
1475 }
1476 }
1477
1478
1479 /**

Callers 7

registerNoArgsMethod · 0.95
registerWithArgsMethod · 0.95
postEventMethod · 0.45
handleKeyEventMethod · 0.45
listFilesImplMethod · 0.45
splitMethod · 0.45
matchAllMethod · 0.45

Calls 4

findIndexMethod · 0.95
expandMethod · 0.95
dieMethod · 0.80
getNameMethod · 0.45

Tested by

no test coverage detected