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

26
LINES

< > BotCompany Repo | #1003810 // genLog, genLog_set, genLog_clear

JavaX fragment (include)

1  
static ThreadLocal<L<S>> genLog_log;
2  
3  
static L<S> genLog() {
4  
  genLog_init();
5  
  L<S> log = genLog_log.get();
6  
  /*if (log == null)
7  
    log = (L) callOpt(creator(), "genLog");*/
8  
  ret assertNotNull("No log set for this thread", log);
9  
}
10  
11  
static void genLog_set(L<S> log) {
12  
  genLog_init();
13  
  genLog_log.set(log);
14  
}
15  
16  
static void genLog_clear() {
17  
  genLog_init();
18  
  genLog_log.set(null);
19  
}
20  
21  
static void genLog_init() {
22  
  if (genLog_log == null) {
23  
    genLog_log = (ThreadLocal) getOpt(creator(), "genLog_log");
24  
    if (genLog_log == null) genLog_log = new ThreadLocal;
25  
  }
26  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003810
Snippet name: genLog, genLog_set, genLog_clear
Eternal ID of this version: #1003810/1
Text MD5: fb4ea0757ba50ecd9fea4101adac75bb
Author: stefan
Category: javax / talking robots
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-04 02:29:40
Source code size: 594 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 739 / 724
Referenced in: [show references]