Libraryless. Click here for Pure Java version (15671L/101K).
1 | static Concept nuLike getConceptOrMarkMissingObject(Concepts cc default db_mainConcepts(), Class<? extends Concept> requiredClass, long id) { |
2 | if (cc == null) null; |
3 | Concept c = getConcept(cc, id); |
4 | if (isInstanceOf(c, requiredClass)) ret c; |
5 | if (c instanceof CMissingObject) ret c; |
6 | if (c != null) fail("Can't cast: " + toStringWithClassName(c) + "/" + requiredClass); |
7 | |
8 | // it's missing, create the CMissing marker |
9 | lock dbLock(cc); |
10 | if (getConcept(cc, id) == null) |
11 | ret cnew(cc, CMissingObject); |
12 | |
13 | null; |
14 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031562 |
Snippet name: | getConceptOrMarkMissingObject |
Eternal ID of this version: | #1031562/3 |
Text MD5: | 608ddacf114f8106100cb5d7e07cec62 |
Transpilation MD5: | 109da534747b0be43dc7e781f4df263f |
Author: | stefan |
Category: | javax / concepts |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-22 03:12:26 |
Source code size: | 538 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 161 / 238 |
Version history: | 2 change(s) |
Referenced in: | [show references] |