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

Method match

classpath/avian/Classes.java:396–409  ·  view source on GitHub ↗
(VMClass a, VMClass b)

Source from the content-addressed store, hash-verified

394 }
395
396 private static boolean match(VMClass a, VMClass b) {
397 // TODO: in theory we should be able to just do an == comparison
398 // here instead of recursively comparing array element types.
399 // However, the VM currently can create multiple array classes for
400 // the same element type. We should fix that so that there's only
401 // ever one of each per classloader, eliminating the need for a
402 // recursive comparison. See also the native implementation of
403 // isAssignableFrom.
404 if (a.arrayDimensions > 0) {
405 return match(a.arrayElementClass, b.arrayElementClass);
406 } else {
407 return a == b;
408 }
409 }
410
411 public static boolean match(Class[] a, Class[] b) {
412 if (a.length == b.length) {

Callers 2

findMethodMethod · 0.95

Calls 1

toVMClassMethod · 0.95

Tested by

no test coverage detected