MCPcopy Create free account
hub / github.com/ReadyTalk/avian / getDeclaredConstructor

Method getDeclaredConstructor

classpath/java/lang/Class.java:254–271  ·  view source on GitHub ↗
(Class ... parameterTypes)

Source from the content-addressed store, hash-verified

252 }
253
254 public Constructor getDeclaredConstructor(Class ... parameterTypes)
255 throws NoSuchMethodException
256 {
257 Constructor c = null;
258 Constructor[] constructors = getDeclaredConstructors();
259
260 for (int i = 0; i < constructors.length; ++i) {
261 if (Classes.match(parameterTypes, constructors[i].getParameterTypes())) {
262 c = constructors[i];
263 }
264 }
265
266 if (c == null) {
267 throw new NoSuchMethodException();
268 } else {
269 return c;
270 }
271 }
272
273 private int countConstructors(boolean publicOnly) {
274 int count = 0;

Callers

nothing calls this directly

Calls 3

matchMethod · 0.95
getParameterTypesMethod · 0.45

Tested by

no test coverage detected