Exemple #1
0
 public static boolean isDirectSubclass(
     @NotNull ClassDescriptor subClass, @NotNull ClassDescriptor superClass) {
   for (KotlinType superType : subClass.getTypeConstructor().getSupertypes()) {
     if (isSameClass(superType, superClass.getOriginal())) {
       return true;
     }
   }
   return false;
 }
Exemple #2
0
 public static boolean isSubclass(
     @NotNull ClassDescriptor subClass, @NotNull ClassDescriptor superClass) {
   return isSubtypeOfClass(subClass.getDefaultType(), superClass.getOriginal());
 }