1 | static Set<Class> allInterfacesImplementedBy(O o) { |
2 | ret allInterfacesImplementedBy(_getClass(o)); |
3 | } |
4 | |
5 | static Set<Class> allInterfacesImplementedBy(Class c) { |
6 | if (c == null) null; |
7 | new HashSet<Class> set; |
8 | allInterfacesImplementedBy_find(c, set); |
9 | ret set; |
10 | } |
11 | |
12 | svoid allInterfacesImplementedBy_find(Class c, Set<Class> set) { |
13 | if (c.isInterface() && !set.add(c)) ret; |
14 | do { |
15 | for (Class intf : c.getInterfaces()) |
16 | allInterfacesImplementedBy_find(intf, set); |
17 | } while ((c = c.getSuperclass()) != null); |
18 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1022198 |
Snippet name: | allInterfacesImplementedBy (including c itself if it is an interface) |
Eternal ID of this version: | #1022198/6 |
Text MD5: | 96a668abbfa8a40a2a9a0f59583a26fa |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-04-14 23:48:48 |
Source code size: | 534 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 321 / 399 |
Version history: | 5 change(s) |
Referenced in: | [show references] |