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

14
LINES

< > BotCompany Repo | #1000661 // process function (hotwire and call for processing)

JavaX fragment (include)

1  
static Object process(String processorID, Object in) {
2  
  return process(processorID, in, "in");
3  
}
4  
5  
static Object process(String processorID, Object in, String outVar) {
6  
  try {
7  
    Class processor = hotwire(processorID);
8  
    set(processor, "in", in);
9  
    call(processor, "main", new Object[] {new String[0]});
10  
    return get(processor, outVar);
11  
  } catch (Exception e) {
12  
    throw new RuntimeException("Error in #" + parseSnippetID(processorID), e);
13  
  }
14  
}

Author comment

Began life as a copy of #1000631

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: #1000661
Snippet name: process function (hotwire and call for processing)
Eternal ID of this version: #1000661/1
Text MD5: 8de624d186ca2a078984513a3c81b305
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-08-22 16:34:46
Source code size: 468 bytes / 14 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 855 / 1856
Referenced in: [show references]