Libraryless. Click here for Pure Java version (1840L/12K/40K).
1 | !752 |
2 | |
3 | sclass A {
|
4 | B b; |
5 | |
6 | class B {
|
7 | A a() { ret A.this; }
|
8 | } |
9 | } |
10 | |
11 | p {
|
12 | new A a; |
13 | A.B b = a.new B; |
14 | a.b = b; |
15 | |
16 | S s = structure(b); |
17 | print(s); |
18 | b = (A.B) unstructure(s); |
19 | assertNotNull("b.a", b.a());
|
20 | |
21 | s = structure(a); |
22 | print(s); |
23 | a = (A) unstructure(s); |
24 | assertNotNull("a", a);
|
25 | assertNotNull("a.b", a.b);
|
26 | assertSame("a.b.a", a, a.b.a());
|
27 | } |
Began life as a copy of #1004781
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1004783 |
| Snippet name: | Try structure/unstructure with non-static self-referencing inner class |
| Eternal ID of this version: | #1004783/1 |
| Text MD5: | 2d2a90404cebcb499bfa721f84ea426f |
| Transpilation MD5: | 93e5c95229317cc336b3ea9153ee6816 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-08-30 23:10:57 |
| Source code size: | 390 bytes / 27 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 836 / 970 |
| Referenced in: | [show references] |