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

10
LINES

< > BotCompany Repo | #1026270 - shallowCloneToUnlistedConcept

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

Libraryless. Click here for Pure Java version (12860L/87K).

static <A extends Concept> A nuLike shallowCloneToUnlistedConcept(Class<A> c, O o) {
  if (o == null) null;
  A cc = unlisted(c);
  copyFields(o, cc, conceptFields(c));
  ret cc;
}

static <A extends Concept> A shallowCloneToUnlistedConcept(A o) {
  ret o == null ? null : (A) shallowCloneToUnlistedConcept(getClass(o), o);
}

Author comment

Began life as a copy of #1026269

download  show line numbers  debug dex   

Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026270
Snippet name: shallowCloneToUnlistedConcept
Eternal ID of this version: #1026270/5
Text MD5: 5eb6a3ef62f734a147cdde125ba15b21
Transpilation MD5: fcddeb702085862f142c2400b8cbe83a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-24 00:37:57
Source code size: 336 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 24 / 58
Version history: 4 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1026270 & http://1026270.tinybrain.de