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)

1  
sO ccallOrGet(O c, S name) {
2  
  c = derefRef(c);
3  
  O o;
4  
  if (hasMethod(c, name))
5  
    o = ccall(c, name);
6  
  else
7  
    o = getOpt(c, name);
8  
  ret derefRef(o);
9  
}
10  
11  
sO mapMethodLike ccallOrGet(S name, O c) {
12  
  ret ccallOrGet(c, name);
13  
}

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: 144 / 173
Referenced in: [show references]