Libraryless. Click here for Pure Java version (2993L/20K/65K).
1 | !752 |
2 | |
3 | !include #1002529 // Explain |
4 | |
5 | p { |
6 | for (S java : toLinesFullTrim([[ |
7 | class bla { bla() {} } |
8 | class bla { void bla() {} } |
9 | class blubb { void bla() {} } |
10 | class bla { class sub { sub() {} } } // difficult case! |
11 | ]])) pcall { |
12 | O parseResult = jparse1(java); |
13 | L e = cast call(parseResult, "explain", "source"); |
14 | printStructure(e); |
15 | Explain explain = new Explain(parseResult, e); |
16 | assertEquals("classdecl", explain.className()); |
17 | |
18 | // remove all inner classes |
19 | explain.pruneSubs("classdecl"); |
20 | |
21 | print(java); |
22 | print(" Constructors: " + structure(explain.findAll("constructordecl"))); |
23 | } |
24 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002530 |
Snippet name: | Test constructor finding |
Eternal ID of this version: | #1002530/1 |
Text MD5: | de6fa112c682952205243adee952bb7d |
Transpilation MD5: | dccb6d92949e5c99cc9ec2ca6fd0362b |
Author: | stefan |
Category: | |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-01-31 03:57:46 |
Source code size: | 661 bytes / 24 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 703 / 741 |
Referenced in: | [show references] |