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

9
LINES

< > BotCompany Repo | #1031392 // shortDynClassNameForStructure

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

Transpiled version (4591L) is out of date.

// keeps package names for dynamic code (package dyn.*)
sS shortDynClassNameForStructure(O o) {
   if (o instanceof DynamicObject && ((DynamicObject) o).className != null)
    ret ((DynamicObject) o).className;
  if (o == null) null;
  Class c = o instanceof Class ? (Class) o : o.getClass();
  S name = c.getName();
  ret name.startsWith("dyn.") ? classNameToVM(name) : shortenClassName(name);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1031392
Snippet name: shortDynClassNameForStructure
Eternal ID of this version: #1031392/4
Text MD5: 496f531a63b285bd28faadc4387f8ba2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-23 05:50:36
Source code size: 404 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 275 / 340
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)