Libraryless. Click here for Pure Java version (1404L/10K/31K).
!747 m { static S snippetID = "#1001187", className = "Console"; p { S text = loadSnippet(snippetID); S c = findClass(text, className); if (c == null) print(className + " not found in " + snippetID + "."); else { print("Found."); print(); print(c); } } static S findClass(S text, S className) { for (L<S> c : allClasses(text)) { S name = getClassDeclarationName(c); if (eq(name, className)) ret join(c); S result = findClass(join(getClassBody(c)), className); if (result != null) ret result; } ret null; } }
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001620 |
Snippet name: | Extract class from source snippet (developing) |
Eternal ID of this version: | #1001620/1 |
Text MD5: | 600d0de8de34c9b9763c538d8dacf530 |
Transpilation MD5: | 6fbacfbe37bca74df63e6a772723b1b9 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-11-29 20:44:30 |
Source code size: | 655 bytes / 30 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 599 / 652 |
Referenced in: | #3000382 - Answer for ferdie (>> t = 1, f = 0) #3000383 - Answer for funkoverflow (>> t=1, f=0 okay) |