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

7
LINES

< > BotCompany Repo | #1023947 // dm_resetField - reset a field in a module to the constructor-defined value. creates a new instance of the module class, then throws it away

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

Libraryless. Click here for Pure Java version (2988L/19K).

sO mapMethodLike dm_resetField(S field, O mod) {
  mod = dm_getModule(mod);
  if (mod == null) null;
  O value = dm_originalFieldValue(field, mod);
  dm_setOpt(mod, field, value);
  ret value;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, yanjaxplzisb

No comments. add comment

Snippet ID: #1023947
Snippet name: dm_resetField - reset a field in a module to the constructor-defined value. creates a new instance of the module class, then throws it away
Eternal ID of this version: #1023947/8
Text MD5: 7be457f98c531fed9eaff9e377f6c160
Transpilation MD5: f72257f8ee0e26e9ae8278d49eb5b899
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-17 21:26:43
Source code size: 200 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 225 / 347
Version history: 7 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1024027 - dm_originalFieldValue
#1024028 - dm_resetField_union - set-merge lists
#1024561 - dm_resetFieldAndReload
#1029346 - dm_resetFields