code: private Type[] getGenericInterfaces(Class<?> componentClass)
      {
          Type[] interfaceTypes;
          try {
              interfaceTypes = componentClass.getGenericInterfaces();
          } catch (Exception e) {
              throw new RuntimeException(String.format("Failed to get interface for [%s]", componentClass.getName()), e);
          }
          return interfaceTypes;
      }
docs: Helper method that generate a {@link RuntimeException} in case of a reflection error.
  
  @param componentClass the component for which to return the interface types
  @return the Types representing the interfaces directly implemented by the class or interface represented by this
  object
  @throws RuntimeException in case of a reflection error such as
  {@link java.lang.reflect.MalformedParameterizedTypeException}