code: public void registerVariantResolver(VariantResolver resolver) {
  
  		for (VariantResolver variantResolver : variantResolvers.values()) {
  			if (StringUtils.isEmpty(resolver.getVariantType())) {
  				throw new IllegalStateException(
  						"The getVariantType() method must return something at " + resolver.getClass());
  			}
  
  			if (resolver.getVariantType().equals(variantResolver.getVariantType())) {
  				throw new IllegalStateException("There are 2 resolvers defined for the variant type '"
  						+ resolver.getVariantType() + "' : " + variantResolver.getClass() + ";" + resolver.getClass());
  			}
  		}
  		variantResolvers.put(resolver.getVariantType(), resolver);
  	}
docs: Register a variant resolver
  
  @param resolver
  the variant resolver