Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.commons.configuration;
 
ConfigurationUtils. Contains utility methods used in configuration

Author(s):
Tristan Tarrant
Since:
5.2
public final class ConfigurationUtils {
   private ConfigurationUtils() {}
   @SuppressWarnings("unchecked")
   public static <B> Class<? extends Builder<B>> builderFor(B built) {
      BuiltBy builtBy = built.getClass().getAnnotation(BuiltBy.class);
      if (builtBy == null) {
         throw new CacheConfigurationException("Missing BuiltBy annotation for configuration bean " + built.getClass().getName());
      }
      return (Class<? extends Builder<B>>) builtBy.value();
   }
New to GrepCode? Check out our FAQ X