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

47
LINES

< > BotCompany Repo | #1020796 // dm_vmBus_answerToMessage

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (13217L/82K).

static AutoCloseable mapMethodLike dm_vmBus_answerToMessage(S msg, final IF0 f) {
  final DynModule m = dm_current_mandatory();
  ret dm_ownResource(vmBus_addListener_basic(msg, func(S _msg, O arg) {
    temp m.enter();
    ret callF(f);
  }));
}

static AutoCloseable mapMethodLike dm_vmBus_answerToMessage(S msg, final F0 f) {
  final DynModule m = dm_current_mandatory();
  ret dm_ownResource(vmBus_addListener_basic(msg, func(S _msg, O arg) {
    temp m.enter();
    ret callF(f);
  }));
}

static AutoCloseable dm_vmBus_answerToMessage(S msg, final F1 f) {
  final DynModule m = dm_current_mandatory();
  ret dm_ownResource(vmBus_addListener_basic(msg, func(S _msg, O arg) {
    temp m.enter();
    ret callF(f, arg);
  }));
}

static AutoCloseable dm_vmBus_answerToMessage(S msg, F2 f) {
  final DynModule m = dm_current_mandatory();
  ret dm_ownResource(vmBus_addListener_basic(msg, func(S _msg, O arg) {
    if (arg cast O[]) {
      if (arg.length != 2) null;
      temp m.enter();
      ret callF(f, arg[0], arg[1]);
    }
    null;
  }));
}

static AutoCloseable dm_vmBus_answerToMessage(S msg, F3 f) {
  final DynModule m = dm_current_mandatory();
  ret dm_ownResource(vmBus_addListener_basic(msg, func(S _msg, O arg) {
    if (arg cast O[]) {
      if (arg.length != 3) null;
      temp m.enter();
      ret callF(f, arg[0], arg[1], arg[2]);
    }
    null;
  }));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020796
Snippet name: dm_vmBus_answerToMessage
Eternal ID of this version: #1020796/10
Text MD5: 14b53859f3761335aae2e41ae3ca4777
Transpilation MD5: 0a3078887c7e2deff670393aed057e0c
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-10 18:14:18
Source code size: 1425 bytes / 47 lines
Pitched / IR pitched: No / No
Views / Downloads: 441 / 594
Version history: 9 change(s)
Referenced in: [show references]