presto-main/src/main/java/io/prestosql/sql/planner/iterative/RuleIndex.java/RuleIndex/supertypes
class RuleIndex:    private static Stream<Class<?>> supertypes(Class<?> type)
    {
        return TypeToken.of(type).getTypes().stream()
                .map(TypeToken::getRawType);
    }