code: public static <T> T getBean(Class<T> interfaceClass, Class typeClass) {
          Object object = serviceMap.get(interfaceClass.getName() + "<" + typeClass.getName() + ">");
          if(object == null) return null;
          if(object instanceof Object[]) {
              return (T)Array.get(object, 0);
          } else {
              return (T)object;
          }
      }
docs: Get a cached singleton object from service map by interface class and generic type class.
  The serviceMap is constructed from service.yml which defines interface and generic type
  to implementation mapping.
  
  @param interfaceClass Interface class
  @param <T> class type
  @param typeClass Generic type class
  @return The implementation object