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

11
LINES

< > BotCompany Repo | #1011818 // callAndMake_orDirect - dynamically load standard function OR execute it in current program (if it's there)

JavaX fragment (include)

static O callAndMake_orDirect(S functionName, L args) {
  ret callAndMake_orDirect(functionName, toObjectArray(args));
}

static O callAndMake_orDirect(S functionName, O... args) {
  if (functionName == null) null;
  if (hasMethod(mc(), functionName, args))
    ret callMC(functionName, args);
  else
    ret makeAndCall_cached(functionName, args);
}

Author comment

Began life as a copy of #1011493

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: #1011818
Snippet name: callAndMake_orDirect - dynamically load standard function OR execute it in current program (if it's there)
Eternal ID of this version: #1011818/4
Text MD5: 1518b18db88668d1ea09c0e35b54cf1f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-20 02:09:44
Source code size: 360 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 472 / 512
Version history: 3 change(s)
Referenced in: [show references]