code: public Map<String, VariantSet> getAvailableVariants(String path) {
  
  		Map<String, VariantSet> availableVariants = new TreeMap<>();
  		ResourceGenerator generator = resolveResourceGenerator(path);
  		if (generator != null) {
  			if (generator instanceof VariantResourceGenerator) {
  
  				Map<String, VariantSet> tempResult = ((VariantResourceGenerator) generator)
  						.getAvailableVariants(generator.getResolver().getResourcePath(path));
  				if (tempResult != null) {
  					availableVariants = tempResult;
  				}
  			} else if (generator instanceof LocaleAwareResourceGenerator) {
  				List<String> availableLocales = ((LocaleAwareResourceGenerator) generator)
  						.getAvailableLocales(generator.getResolver().getResourcePath(path));
  				if (availableLocales != null) {
  					VariantSet variantSet = new VariantSet(JawrConstant.LOCALE_VARIANT_TYPE, "", availableLocales);
  					availableVariants.put(JawrConstant.LOCALE_VARIANT_TYPE, variantSet);
  				}
  			}
  		}
  
  		return availableVariants;
  	}
docs: Returns the available variant for a path
  
  @param path
  the path
  @return the available variant for a path