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

25
LINES

< > BotCompany Repo | #1007324 // New hotwire using outer JavaX for clients (LIVE)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3045L/18K).

// custom mainClass only works with hotwire_here
static Class<?> hotwire(S src, IF1<ClassLoader, S> calculateMainClass default lambda1 mainClassNameForClassLoader) {
  assertFalse(_inCore());
  Class j = getJavaX();
  if (isAndroid()) {
    synchronized(j) { // hopefully this goes well...
      List<File> libraries = new ArrayList<File>();
      File srcDir = (File) call(j, "transpileMain", src, libraries);
      if (srcDir == null)
        fail("transpileMain returned null (src=" + quote(src) + ")");
    
      Object androidContext = get(j, "androidContext");
      return (Class) call(j, "loadx2android", srcDir, src);
    }
  } else {
    ifdef hotwire_here
    ret hotwire_overInternalBot(src, calculateMainClass);
    endifdef
    ifndef hotwire_here
    Class c = cast call(j, "hotwire", src);
    hotwire_copyOver(c);
    ret c;
    endifndef
  }
}

Author comment

Began life as a copy of #1000963

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1007324
Snippet name: New hotwire using outer JavaX for clients (LIVE)
Eternal ID of this version: #1007324/8
Text MD5: d05c219259365093b2253484029a0671
Transpilation MD5: 2736f0b100547b337d48aa1fd7489a80
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-05 01:24:05
Source code size: 886 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 765 / 1114
Version history: 7 change(s)
Referenced in: [show references]