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

15
LINES

< > BotCompany Repo | #1031752 // MTSH_nonTransientFields - visitor only

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

Libraryless. Click here for Pure Java version (3734L/22K).

// checks only non-transient, non-primitive fields
sclass MTSH_nonTransientFields implements MetaTransformer.StructureHandler {
  swappable bool shouldLookInto(O o) { true; }
  //swappable O cloneEmptyObject(O o) { unimplemented(); }
  
  /*public O transform(O o, IF1 recurse) {
    throw unimplemented();
  }*/
    
  public void visit(O o, IVF1 recurse) {
    if (shouldLookInto(o))
      for (Field f : nonStaticNonPrimitiveNonTransientFieldObjects_cachedArray(o))
        recurse.get(getField(f, o));
  }
}

Author comment

Began life as a copy of #1031054

download  show line numbers  debug dex  old transpilations   

Travelled to 5 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031752
Snippet name: MTSH_nonTransientFields - visitor only
Eternal ID of this version: #1031752/6
Text MD5: 6b16872d3dfdef399b5aac65cb5127fe
Transpilation MD5: 65bacb498f4eefb6d52b2e68dd7b9161
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-29 05:54:02
Source code size: 525 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 291 / 476
Version history: 5 change(s)
Referenced in: [show references]