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

Method countConstructors

classpath/java/lang/Class.java:273–287  ·  view source on GitHub ↗
(boolean publicOnly)

Source from the content-addressed store, hash-verified

271 }
272
273 private int countConstructors(boolean publicOnly) {
274 int count = 0;
275 if (vmClass.methodTable != null) {
276 for (int i = 0; i < vmClass.methodTable.length; ++i) {
277 if (((! publicOnly)
278 || ((vmClass.methodTable[i].flags & Modifier.PUBLIC))
279 != 0)
280 && Method.getName(vmClass.methodTable[i]).equals("<init>"))
281 {
282 ++ count;
283 }
284 }
285 }
286 return count;
287 }
288
289 public Constructor[] getDeclaredConstructors() {
290 Constructor[] array = new Constructor[countConstructors(false)];

Callers 2

getConstructorsMethod · 0.95

Calls 2

getNameMethod · 0.95
equalsMethod · 0.65

Tested by

no test coverage detected