Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1033878 // getDefaultConstructor

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (7505L/42K).

static Constructor getDefaultConstructor(Class c) {
  if (c != null)
    for (Constructor m : getDeclaredConstructors_cached(c))
      if (empty(m.getParameterTypes()))
        ret m;
  null;
}

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: 91 / 147
Version history: 1 change(s)
Referenced in: [show references]