Libraryless. Click here for Pure Java version (1688L/11K).
1 | sbool objectDirectlyReferencesObjectOfType(O a, Class c) ctex { |
2 | if (a == null) false; |
3 | if (a instanceof O[]) |
4 | for (O x : (O[]) a) |
5 | if (isInstance(c, x)) |
6 | true; |
7 | for (Field f : nonStaticNonPrimitiveFieldObjects(a)) |
8 | if (isInstance(c, f.get(a))) |
9 | true; |
10 | false; |
11 | } |
Began life as a copy of #1024099
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024100 |
Snippet name: | objectDirectlyReferencesObjectOfType |
Eternal ID of this version: | #1024100/5 |
Text MD5: | e4211b40000f66ce9ee4725536ed9b00 |
Transpilation MD5: | 0a0995518f7eb5b0fe0a4f11aa703077 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-20 19:24:56 |
Source code size: | 298 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 209 / 317 |
Version history: | 4 change(s) |
Referenced in: | [show references] |