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: 754 / 16454
Version history: 11 change(s)
Referenced in: #1006723 - Higher-Level-Transpiled #759 Spike [old]
#1006724 - Backup of #759 before switching to higher-level-translation
#1007595 - "Super-Edgy" JavaX Translator (Extension of #752) [dev., broken]
#1010083 - Backup of "Super-Edgy" JavaX Translator (Extension of #7)
#1010084 - Speeding up "Super-Edgy" JavaX Translator (Extension of #7)
#1010087 - Speeding up "Super-Edgy" JavaX Translator (Extension of #7) 2
#1016582 - Global Utils (stuff in here gets moved to x30_pkg.x30_util.*)
#1031744 - DynamicObject (imported from core - see #1004543)
#1033861 - Loadable Utils for Gazelle 22 [dev version]
#1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)
#1034184 - test_callForbiddenMethodByReflection