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

13
LINES

< > BotCompany Repo | #1025165 - fixOuterRefs - fix this$1 for classes that have more than one instance and only one field is set

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

Libraryless. Click here for Pure Java version (2127L/14K).

svoid fixOuterRefs(O o) ctex {
  if (o == null) ret;
  Field[] l = thisDollarOneFields(o.getClass());
  if (l.length <= 1) ret;
  O father = null;
  for (Field f : l) {
    father = f.get(o);
    if (father != null) break;
  }
  if (father == null) ret;
  for (Field f : l)
    f.set(o, father);
}

download  show line numbers  debug dex   

Travelled to 2 computer(s): mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1025165
Snippet name: fixOuterRefs - fix this$1 for classes that have more than one instance and only one field is set
Eternal ID of this version: #1025165/7
Text MD5: ed188976ab4c8b9ac45914553eabcd83
Transpilation MD5: ee470e365fd243b16ef80922726076ad
Author: stefan
Category: javax / internal fixing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-09 23:49:22
Source code size: 309 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 13 / 38
Version history: 6 change(s)
Referenced in: [show references]