Libraryless. Click here for Pure Java version (7505L/42K).
1 | static Constructor getDefaultConstructor(Class c) { |
2 | if (c != null) |
3 | for (Constructor m : getDeclaredConstructors_cached(c)) |
4 | if (empty(m.getParameterTypes())) |
5 | ret m; |
6 | null; |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033878 |
Snippet name: | getDefaultConstructor |
Eternal ID of this version: | #1033878/2 |
Text MD5: | 208263a8066e6aa9d9931a2103690993 |
Transpilation MD5: | b99da486c0b345c2fae317a5fddf70ec |
Author: | stefan |
Category: | javax / reflection |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-29 19:43:49 |
Source code size: | 199 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 239 / 339 |
Version history: | 1 change(s) |
Referenced in: | [show references] |