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

14
LINES

< > BotCompany Repo | #1034431 // Tok_SettableWithVar - implies settableWithChange

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

Transpiled version (6239L) is out of date.

sclass Tok_SettableWithVar > Tok_SettableWithChangeFields {
  *() { super("settableWithVar"); }
  
  S replacement() {
    ret tok_formatDollarVars(
      "public transient simplyCached FieldVar<$boxedType> $varFunc() {
        ret new FieldVar<$boxedType>(this, $fieldName, -> $var(), $var -> $var($var)); }\n",
      varFunc := "var" + firstToUpper(var),
      +var,
      +boxedType(),
      fieldName := quoted(var))
      + super.replacement();
  }
}

Author comment

Began life as a copy of #1034142

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034431
Snippet name: Tok_SettableWithVar - implies settableWithChange
Eternal ID of this version: #1034431/14
Text MD5: 4fa33c177f028220e0fea6d182f3a566
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-07 20:06:58
Source code size: 468 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 87 / 185
Version history: 13 change(s)
Referenced in: [show references]