Transpiled version (7868L) is out of date.
1 | sclass ToJava { |
2 | O get(O o) { |
3 | try object getOpt(o); |
4 | fail("Can't ToJava: " + className(o)); |
5 | } |
6 | |
7 | O getOpt(O o) { |
8 | if (o == null) ret "null"; |
9 | if (o instanceof String) ret quote(o); |
10 | if (o instanceof Number) ret str(o); |
11 | //if (o instanceof Int) ret str(o); |
12 | if (o cast IFieldsToList) |
13 | ret formatFunctionCall("new " + shortName(o), map get(o._fieldsToList())); |
14 | if (o cast L) |
15 | ret functionCall_list ll(map get(o)); |
16 | if (o cast Class) |
17 | ret shortClassName(o) + ".class"; |
18 | if (o cast int[]) |
19 | ret "new int[] {" + joinWithComma(toList(o)) + "}"; |
20 | null; |
21 | } |
22 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033278 |
Snippet name: | ToJava |
Eternal ID of this version: | #1033278/8 |
Text MD5: | 44ff0e864f8813df6d7892a286a8b129 |
Author: | stefan |
Category: | javax / audio analysis |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-04-15 02:45:58 |
Source code size: | 635 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 198 / 331 |
Version history: | 7 change(s) |
Referenced in: | [show references] |