Uses 1113K of libraries. Click here for Pure Java version (6618L/35K).
1 | !7 |
2 | |
3 | cmodule2 > DynTestModule { |
4 | void test { |
5 | new DynamicObject o; |
6 | |
7 | // make o dynamically implement IF0 |
8 | |
9 | addDynamicInterface(o, IF0, () -> "hello"); |
10 | |
11 | // check that the dynamic implementation works |
12 | assertEqualsVerbose("hello", lookupDynamicInterface(o, IF0).get()); |
13 | |
14 | // and that we get null for non-implemented interfaces |
15 | assertNullVerbose(lookupDynamicInterface(o, IF1)); |
16 | } |
17 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031188 |
Snippet name: | DynamicObject Dynamic Interface Implementation Test [OK] |
Eternal ID of this version: | #1031188/10 |
Text MD5: | 0c3288d565d514ac5fb34406152b4c28 |
Transpilation MD5: | 01774446c15928768bdb6bcfe32d22a6 |
Author: | stefan |
Category: | javax / dynamic modules |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-05-20 15:58:49 |
Source code size: | 436 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 175 / 314 |
Version history: | 9 change(s) |
Referenced in: | [show references] |