/**
   * Returns the list of variants that can be converted from a given object class.
   *
   * @param sourceClass The source class.
   * @param targetVariant The expected representation metadata.
   * @return The list of variants that can be converted.
   */
  public static List<VariantInfo> getVariants(Class<?> sourceClass, Variant targetVariant) {
    List<VariantInfo> result = null;

    for (ConverterHelper ch : Engine.getInstance().getRegisteredConverters()) {
      if (ch != null) {
        try {
          result = ch.addVariants(sourceClass, targetVariant, result);
        } catch (IOException e) {
          Context.getCurrentLogger()
              .log(Level.FINE, "Unable get the variants of the " + ch + " converter helper.", e);
        }
      }
    }

    return result;
  }