presto-main/src/main/java/io/prestosql/sql/planner/iterative/RuleIndex.java/RuleIndex/getCandidates
class RuleIndex:    public Stream<Rule<?>> getCandidates(Object object)
    {
        return supertypes(object.getClass())
                .flatMap(clazz -> rulesByRootType.get(clazz).stream());
    }