(String p, Object o)
| 454 | } |
| 455 | |
| 456 | @Override |
| 457 | @HiddenInAutocomplete |
| 458 | public Object asMap_set(String p, Object o) { |
| 459 | Object fo = Conversions.convert(o, Supplier.class); |
| 460 | if (fo instanceof Supplier) return getDefaultBundle().set(p, (Supplier) fo); |
| 461 | if (fo instanceof InvocationHandler) { |
| 462 | return getDefaultBundle().set(p, () -> { |
| 463 | try { |
| 464 | return ((InvocationHandler) fo).invoke(fo, supplier_get, nothing); |
| 465 | } catch (Throwable throwable) { |
| 466 | throwable.printStackTrace(); |
| 467 | } |
| 468 | return null; |
| 469 | }); |
| 470 | } |
| 471 | |
| 472 | if (Uniform.isAccepableInstance(fo)) |
| 473 | return getDefaultBundle().set(p, () -> fo).setIntOnly(fo instanceof Integer); |
| 474 | |
| 475 | if (o instanceof ContainsPerform) { |
| 476 | o = ((ContainsPerform) o).getPerform(); |
| 477 | } |
| 478 | if (fo instanceof OffersUniform) { |
| 479 | getDefaultBundle().set(p, () -> ((OffersUniform) fo).getUniform()); |
| 480 | // fall through -- connect things as well as set them as uniforms |
| 481 | } |
| 482 | |
| 483 | o = Conversions.convert(o, Perform.class); |
| 484 | if (o instanceof Perform) { |
| 485 | return attach(p, (Perform) o); |
| 486 | } else return super.asMap_set(p, o); |
| 487 | } |
| 488 | |
| 489 | @Override |
| 490 | @HiddenInAutocomplete |
no test coverage detected