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

13
LINES

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

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

Transpiled version (18173L) is out of date.

sO cgetOrCall(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 cgetOrCall(S name, O c) {
  ret cgetOrCall(c, name);
}

Author comment

Began life as a copy of #1006649

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1032675
Snippet name: cgetOrCall - get concept field of name of call method. prefers calling the method
Eternal ID of this version: #1032675/3
Text MD5: 2e9e42cd1c92e8e021b9f80460782933
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-01 17:37:11
Source code size: 242 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 137 / 199
Version history: 2 change(s)
Referenced in: [show references]