code: @SuppressWarnings("unchecked")
      <T> List<T> getFacets(@Nullable Class<T> facet)
      {
          if (facet != null && Plugin.class.isAssignableFrom(facet))
          {
              List<T> ts = new ArrayList<>();
              Plugin plugin = pluginsByClass.get(facet);
              if (plugin != null)
              {
                  ts.add((T) plugin);
              }
              return ts;
          }
          return (List<T>) pluginsByFacet.get(facet);
      }
docs: Returns the list of plugins implementing the given facet.
  <p>
  In order to provide more flexibility, the given class can also
  be a Plugin class. In this case, its implementation will be directly
  returned if present.
  </p>
  
  @param facet the facet class
  @param <T>   the facet type
  @return the list of facet implementations, or an empty list if not present