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)

static ThreadLocal<L<S>> genLog_log;

static L<S> genLog() {
  genLog_init();
  L<S> log = genLog_log.get();
  /*if (log == null)
    log = (L) callOpt(creator(), "genLog");*/
  ret assertNotNull("No log set for this thread", log);
}

static void genLog_set(L<S> log) {
  genLog_init();
  genLog_log.set(log);
}

static void genLog_clear() {
  genLog_init();
  genLog_log.set(null);
}

static void genLog_init() {
  if (genLog_log == null) {
    genLog_log = (ThreadLocal) getOpt(creator(), "genLog_log");
    if (genLog_log == null) genLog_log = new ThreadLocal;
  }
}

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