code: public static Set<Class<?>> findAssignableClasses(ScriptModule module, Class<?> targetClass) {
          Set<Class<?>> result = new LinkedHashSet<Class<?>>();
          for (Class<?> candidateClass : module.getLoadedClasses()) {
              if (targetClass.isAssignableFrom(candidateClass)) {
                  result.add(candidateClass);
              }
          }
          return result;
      }
docs: Find all of the classes in the module that are subclasses or equal to the target class
  @param module module to search
  @param targetClass target type to search for
  @return first instance that matches the given type