Libraryless. Click here for Pure Java version (2719L/17K).
svoid test_getTypeArgumentAsClass() { class X { LS bla; L x; LLS y; } Type type = genericFieldType(X.class, 'bla); assertEqualsVerbose(S.class, getTypeArgumentAsClass(type)); assertEqualsVerbose(L.class, getTypeArgumentAsClass(genericFieldType(X.class, 'y))); assertEqualsVerbose(null, getTypeArgumentAsClass(genericFieldType(X.class, 'x))); }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1029589 |
Snippet name: | test_getTypeArgumentAsClass (OK) |
Eternal ID of this version: | #1029589/5 |
Text MD5: | 700a0d8a76796082824f3c3d8038315f |
Transpilation MD5: | 0f7ffc249100e87ce5b94ce90164a2f2 |
Author: | stefan |
Category: | javax / reflection |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-08-27 13:22:48 |
Source code size: | 381 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 260 / 362 |
Version history: | 4 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |