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

13
LINES

< > BotCompany Repo | #1010948 // callAllMethodsInInterface ["interface" can be a class too]

JavaX fragment (include)

static Map<S, O> callAllMethodsInInterface(O o, Class intrface) {
  new TreeMap<S, O> map;
  for (Method m : intrface.getDeclaredMethods()) {
    if (!empty(m.getParameterTypes())) continue;
    S name = m.getName();
    try {
      map.put(name, call(o, name));
    } catch e {
      map.put(name, e);
    }
  }
  ret map;
}

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: #1010948
Snippet name: callAllMethodsInInterface ["interface" can be a class too]
Eternal ID of this version: #1010948/2
Text MD5: 3f524af52e95550275199afce64ca881
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-05 01:01:02
Source code size: 337 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 323 / 362
Version history: 1 change(s)
Referenced in: [show references]