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

18
LINES

< > BotCompany Repo | #1004543 // class DynamicObject (now in x30_pkg.x30_util)

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

Transpiled version (2768L) is out of date.

static class DynamicObject {
  S className; // just the name, without the "main$"
  
  // string key = dynamic field
  // interface key = dynamic interface
  LinkedHashMap/*<S, O>*/ fieldValues; // dropped the type parameters 2021/5/19 to allow for dynamic interfaces
  
  *() {}
  // className = just the name, without the "main$"
  *(S *className) {}
  
  Map<S, O> _map() { ret fieldValues; }
  
  toString {
    ret getClass() == DynamicObject.class ? "dyn " + className
      : super.toString();
  }
}

Author comment

We merged stuff from Concept here to allow for loading unknown concepts.

download  show line numbers  debug dex  old transpilations   

Travelled to 30 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, fehiwqupcyrn, gwrvuhgaqvyk, imzmzdywqqli, ishqpsrjomds, jcllbfdqhrgy, jtubtzbbkimh, lhdilzshxjzv, lpdgvwnxivlt, lulzaavyztxj, mqqgnosmbjvj, ofpaelxlmzfo, onxytkatvevr, ppjhyzlbdabe, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, snaazhdonpnp, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, wtqryiryparv, xfddqsrefgvo, xprdwmaupziu, xrpafgyirdlv

No comments. add comment

Snippet ID: #1004543
Snippet name: class DynamicObject (now in x30_pkg.x30_util)
Eternal ID of this version: #1004543/12
Text MD5: 18430018245df6cb562488f51a192881
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:35:05
Source code size: 523 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 752 / 16453
Version history: 11 change(s)
Referenced in: [show references]