code: public static List<ClassRef> findBuildableReferences(ClassRef ref) {
          List<ClassRef>  result = new ArrayList<>();
          TypeDef def = new TypeDefBuilder(ref.getDefinition())
                  .accept(new TypedVisitor<ClassRefBuilder>() {
                      @Override
                      public void visit(ClassRefBuilder builder) {
                          ClassRef candidate = builder.build();
                          if (isBuildable(candidate)) {
                              result.add(candidate);
                          }
                      }
                  })
                  .build();
          return result;
      }
docs: Returns all references of a {@link ClassRef} that are considered buildable.
  @param ref       The reference.
  @return          The list with all detected references.