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

15
LINES

< > BotCompany Repo | #1033243 // ICachedJavaXExpr

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

Libraryless. Click here for Pure Java version (8775L/49K).

1  
// represents a JavaX expression that can both
2  
// -be evaluated right now (quickEval())
3  
// -be transformed into Java source code (str())
4  
//
5  
// A is the expression's return type.
6  
7  
sinterface ICachedJavaXExpr<A> extends IMeta {
8  
  // override to provide an evaluation result
9  
  public default A quickEval() { fail("Can't quick eval: " + toStringWithClassName(this)); }
10  
  
11  
  public default O javaConstruct() { this; }
12  
  
13  
  // overridable
14  
  default int sourceCodeLength() { ret l(toString()); }
15  
}

Author comment

Began life as a copy of #1033208

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033243
Snippet name: ICachedJavaXExpr
Eternal ID of this version: #1033243/7
Text MD5: 6424cf216528f37ae9d7a75fa323b33d
Transpilation MD5: a6b63218a325195886d31ec44ea8aae5
Author: stefan
Category: javax / code generation
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-27 02:06:50
Source code size: 504 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 193 / 318
Version history: 6 change(s)
Referenced in: [show references]