Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
For example.
class A {
}
class B extends A {
}
class C extends B {
}
int d;
d = InheritanceUtils.distance(A.class, A.class);
Assert.assertEquals(0, d);
d = InheritanceUtils.distance(B.class, A.class);
Assert.assertEquals(1, d);
d = InheritanceUtils.distance(C.class, A.class);
Assert.assertEquals(2, d);