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

29
LINES

< > BotCompany Repo | #1020757 // callFInRealMC - callF + adjust for real main class

JavaX fragment (include)

ifclass F0
  static <A> A callFInRealMC(O realm, F0<A> f) {
    ret f == null ? null : f.get();
  }
endif

ifclass F1
  static <A, B> B callFInRealMC(O realm, F1<A, B> f, A a) {
    ret f == null ? null : f.get(a);
  }
endif

ifclass F2
  static <A, B, C> C callFInRealMC(O realm, F2<A, B, C> f, A a, B b) {
    ret f == null ? null : f.get(a, b);
  }
endif

ifclass VF1
  static <A> void callFInRealMC(O realm, VF1<A> f, A a) {
    if (f != null) f.get(a);
  }
endif

static O callFInRealMC(O realm, O f, O... args) {
  if (f instanceof S)
    ret call(getMainClass(realm), (S) f, args);
  ret callF(f, args);
}

Author comment

Began life as a copy of #1003483

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020757
Snippet name: callFInRealMC - callF + adjust for real main class
Eternal ID of this version: #1020757/1
Text MD5: 16d0eba676cbab3c33e5b723d3800996
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-01 20:11:19
Source code size: 640 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 280 / 293
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1020759 - callFInRealOrMyMC - callF + adjust for real main class [now just a synonym of callF since string functions are discontinued]