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

13
LINES

< > BotCompany Repo | #1032700 // ccallOrGet - get concept field of name of call method. prefers calling the method

JavaX fragment (include)

sO ccallOrGet(O c, S name) {
  c = derefRef(c);
  O o;
  if (hasMethod(c, name))
    o = ccall(c, name);
  else
    o = getOpt(c, name);
  ret derefRef(o);
}

sO mapMethodLike ccallOrGet(S name, O c) {
  ret ccallOrGet(c, name);
}

Author comment

Began life as a copy of #1032675

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032700
Snippet name: ccallOrGet - get concept field of name of call method. prefers calling the method
Eternal ID of this version: #1032700/1
Text MD5: f82732b13b86333a45f5e2fa9c52477f
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-02 03:31:38
Source code size: 242 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 145 / 173
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)