docs: public boolean isSubtype(ReferenceType type, ReferenceType possibleSupertype) throws ClassNotFoundException {
  
          // Eliminate some easy cases
          if (type.equals(possibleSupertype)) {
              return true;
          }
          if (possibleSupertype.equals(Type.OBJECT)) {
              return true;
          }
          if (type.equals(Type.OBJECT)) {
              return false;
          }
  
          boolean typeIsObjectType = (type instanceof ObjectType);
          boolean possibleSupertypeIsObjectType = (possibleSupertype instanceof ObjectType);
  
          if (typeIsObjectType && possibleSupertypeIsObjectType) {
              // Both types are ordinary object (non-array) types.
              return isSubtype((ObjectType) type, (ObjectType) possibleSupertype);
          }
  
          boolean typeIsArrayType = (type instanceof ArrayType);
          boolean possibleSupertypeIsArrayType = (possibleSupertype instanceof ArrayType);
  
          if (typeIsArrayType) {
              // Check superclass/interfaces
              if (possibleSupertype.equals(SERIALIZABLE) || possibleSupertype.equals(CLONEABLE)) {
                  return true;
              }
  
              // We checked all of the possible class/interface supertypes,
              // so if possibleSupertype is not an array type,
              // then we can definitively say no
              if (!possibleSupertypeIsArrayType) {
                  return false;
              }
  
              // Check array/array subtype relationship
  
              ArrayType typeAsArrayType = (ArrayType) type;
              ArrayType possibleSupertypeAsArrayType = (ArrayType) possibleSupertype;
  
              // Must have same number of dimensions
              if (typeAsArrayType.getDimensions() < possibleSupertypeAsArrayType.getDimensions()) {
                  return false;
              }
              Type possibleSupertypeBasicType = possibleSupertypeAsArrayType.getBasicType();
              if (!(possibleSupertypeBasicType instanceof ObjectType)) {
                  return false;
              }
              Type typeBasicType = typeAsArrayType.getBasicType();
  
              // If dimensions differ, see if element types are compatible.
              if (typeAsArrayType.getDimensions() > possibleSupertypeAsArrayType.getDimensions()) {
                  return isSubtype(
                          new ArrayType(typeBasicType, typeAsArrayType.getDimensions()
                                  - possibleSupertypeAsArrayType.getDimensions()), (ObjectType) possibleSupertypeBasicType);
              }
  
              // type's base type must be a subtype of possibleSupertype's base
              // type.
              // Note that neither base type can be a non-ObjectType if we are to
              // answer yes.
  
              if (!(typeBasicType instanceof ObjectType)) {
                  return false;
              }
  
              return isSubtype((ObjectType) typeBasicType, (ObjectType) possibleSupertypeBasicType);
          }
  
          // OK, we've exhausted the possibilities now
          return false;
      }