code: public static <T extends RunListener> Optional<T> getAttachedListener(Class<T> listenerType) {
          return Run.getAttachedListener(listenerType);
      }
docs: Get reference to an instance of the specified listener type.
  
  @param <T> listener type
  @param listenerType listener type
  @return optional listener instance