Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

24
LINES

< > BotCompany Repo | #628 // "quickmain" (main {, psvm {)

JavaX translator [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (227L/2K).

!596

!629

!723

public class main {
  public static void main(String[] args) throws Exception {
    L<S> tok = javaTok(loadMainJava());
    int i;
    
    i = findCodeTokens(tok, "main", "{");
    if (i < 0) i = findCodeTokens(tok, "m", "{");
    if (i >= 0 && !(i-2 > 0 && tok.get(i-2).equals("class")))
      tok.set(i, "public class main");
      
    i = findCodeTokens(tok, "psvm", "{");
    if (i < 0) i = findCodeTokens(tok, "p", "{");
    if (i >= 0)
      tok.set(i, "public static void main(String[] args) throws Exception");
    
    // TODO: add androidContext and programID
    
    saveMainJava(join(tok));
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 33 computer(s): adtiomwmedle, aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, cmhtpxxajurv, ddnzoavkxhuk, dhtvkmknsjym, exkalrxbqyxc, fumpprspadck, gkwdfizivqfm, gwrvuhgaqvyk, hxnwyiuffukg, ishqpsrjomds, jlatgrcjtklg, jtubtzbbkimh, kmhbujppghqa, liwcxgsjrgqn, lpdgvwnxivlt, mqqgnosmbjvj, mrjhfnjfopze, nrtiiiyxqhmw, omzkqqnokwlv, onfqjnomoxuw, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, qbtsjoyahagl, teubizvjbppd, tslmcundralx, tvejysmllsmz, ugbnzuvxksoj, vouqrxazstgt

Comments [hide]

ID Author/Program Comment Date
206 #1000604 (pitcher) 2015-08-20 15:28:24
189 #1000610 (pitcher) 2015-08-18 00:50:23

add comment

Snippet ID: #628
Snippet name: "quickmain" (main {, psvm {)
Eternal ID of this version: #628/1
Text MD5: a2211fe66c6d9f49811a739734dac873
Transpilation MD5: 2dc8ce74a0b70e2dc941309bc7f84800
Author: stefan
Category: javax
Type: JavaX translator
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-09-30 18:12:02
Source code size: 650 bytes / 24 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 891 / 21048
Referenced in: [show references]