(Object object)
| 315 | */ |
| 316 | // declared final since this is invoked from constructors |
| 317 | public final void addObject(Object object) { |
| 318 | if (object instanceof Iterable i) { |
| 319 | // Iterable |
| 320 | i.forEach(objects::add); |
| 321 | } else if (object.getClass().isArray()) { |
| 322 | // Array |
| 323 | for (Object o : (Object[]) object) { |
| 324 | objects.add(o); |
| 325 | } |
| 326 | } else { |
| 327 | // Single object |
| 328 | objects.add(object); |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | /** |
| 333 | * Sets the {@link ResourceBundle} to use for looking up descriptions. |
no outgoing calls