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).

1  
// checks only non-transient, non-primitive fields
2  
sclass MTSH_nonTransientFields implements MetaTransformer.StructureHandler {
3  
  swappable bool shouldLookInto(O o) { true; }
4  
  //swappable O cloneEmptyObject(O o) { unimplemented(); }
5  
  
6  
  /*public O transform(O o, IF1 recurse) {
7  
    throw unimplemented();
8  
  }*/
9  
    
10  
  public void visit(O o, IVF1 recurse) {
11  
    if (shouldLookInto(o))
12  
      for (Field f : nonStaticNonPrimitiveNonTransientFieldObjects_cachedArray(o))
13  
        recurse.get(getField(f, o));
14  
  }
15  
}

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: 293 / 480
Version history: 5 change(s)
Referenced in: [show references]