Exemplo n.º 1
0
 boolean computeSubtypeOf(Klass k) {
   if (k.isInterface()) {
     return implementsInterface(k);
   } else {
     return super.computeSubtypeOf(k);
   }
 }
Exemplo n.º 2
0
 public boolean implementsInterface(Klass k) {
   if (Assert.ASSERTS_ENABLED) {
     Assert.that(k.isInterface(), "should not reach here");
   }
   ObjArray interfaces = getTransitiveInterfaces();
   final int len = (int) interfaces.getLength();
   for (int i = 0; i < len; i++) {
     if (interfaces.getObjAt(i).equals(k)) return true;
   }
   return false;
 }