Boolean (final TypeRepr who, final TypeRepr whom) { if (who.equals(whom)) { return Boolean.TRUE; } if (who instanceof TypeRepr.PrimitiveType || whom instanceof TypeRepr.PrimitiveType) { return Boolean.FALSE; } if (who instanceof TypeRepr.ArrayType) { if (whom instanceof TypeRepr.ArrayType) { return isSubtypeOf(((TypeRepr.ArrayType)who).getElementType(), ((TypeRepr.ArrayType)whom).getElementType()); } final String descr = whom.getDescriptor(); if (descr.equals("Ljava/lang/Cloneable") || descr.equals("Ljava/lang/Object") || descr.equals("Ljava/io/Serializable")) { return Boolean.TRUE; } return Boolean.FALSE; } if (whom instanceof TypeRepr.ClassType) { return isInheritorOf(new JvmNodeReferenceID(((TypeRepr.ClassType)who).getJvmName()), new JvmNodeReferenceID(((TypeRepr.ClassType)whom).getJvmName())); } return Boolean.FALSE; }