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

13
LINES

< > BotCompany Repo | #1025067 // dm_originalFieldValues (non-transient only)

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

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

1  
static Map<S, O> dm_originalFieldValues(O mod) {
2  
  mod = dm_getModule(mod);
3  
  if (mod == null) null;
4  
  O tempInstance = newInstance(mod.getClass());
5  
  try {
6  
    new Map<S, O> map;
7  
    for (S field : allNonTransientNonStaticFields(mod))
8  
      map.put(field, getOpt(tempInstance, field));
9  
    ret map;
10  
  } finally {
11  
    cleanUp(tempInstance);
12  
  }
13  
}

Author comment

Began life as a copy of #1024027

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1025067
Snippet name: dm_originalFieldValues (non-transient only)
Eternal ID of this version: #1025067/1
Text MD5: 5ce752523fe2861bd7c2afe4ad172b12
Transpilation MD5: 30d008fd66e1375f544f2962954c8a69
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-09-05 11:48:13
Source code size: 358 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 203 / 280
Referenced in: [show references]