Libraryless. Click here for Pure Java version (7978L/45K).
1 | sbool isPersistableClass(Class c) {
|
2 | S name = c.getName(); |
3 | if (isSubtypeOf(c, TransientObject)) false; |
4 | if (isAnonymousClassName(name)) false; |
5 | if (isBoxedType(c)) true; |
6 | if (isArrayType(c)) true; |
7 | if (c == Class.class || c == S || c == File || c == Color.class) true; |
8 | if (name.startsWith("java.util.Collections$Synchronized")) true;
|
9 | |
10 | if (hasThisDollarFields(c)) |
11 | ret hasSingleArgumentConstructor(c); |
12 | else |
13 | ret getDefaultConstructor(c) != null; |
14 | } |
Began life as a copy of #1031499
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1033879 |
| Snippet name: | isPersistableClass |
| Eternal ID of this version: | #1033879/18 |
| Text MD5: | d7aed1c4177bc5ba25bce24fd289cb7b |
| Transpilation MD5: | 6a06e4e8d2f10da87a5818b0fcb96467 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-05-01 21:03:57 |
| Source code size: | 480 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 549 / 747 |
| Version history: | 17 change(s) |
| Referenced in: | [show references] |