static void renameMainJava(File srcDir, S progID) { File fMain = new File(srcDir, "main.java"); S src = loadTextFile(fMain); if (tok_classHasModifier(findMainClass(javaTok(src)), "public")) ret; S dummyClassName = dummyMainClassName(progID); src += "\nclass " + dummyClassName + "{}"; saveTextFile(new File(srcDir, dummyClassName + ".java"), src); fMain.delete(); }
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: | #1008756 |
Snippet name: | renameMainJava |
Eternal ID of this version: | #1008756/4 |
Text MD5: | d566cb175c0be16dcb50473c1871c78d |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-06-01 01:18:14 |
Source code size: | 387 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 425 / 493 |
Version history: | 3 change(s) |
Referenced in: | [show references] |