Class ConfigurationUtils

java.lang.Object
org.infinispan.commons.configuration.ConfigurationUtils

public final class ConfigurationUtils extends Object
ConfigurationUtils. Contains utility methods used in configuration
Since:
5.2
Author:
Tristan Tarrant
  • Method Details

    • builderFor

      public static <B> Class<? extends Builder<B>> builderFor(B built) throws CacheConfigurationException
      Returns the builder that was used to build this class. This is determined by the instance having a class that has a BuiltBy annotation present on it. If one is not present a CacheConfigurationException is thrown
      Type Parameters:
      B - The type of builder
      Parameters:
      built - The instance to find the builder for
      Returns:
      The builder for this instance
      Throws:
      CacheConfigurationException - thrown if the instance class can't provide the builder
    • builderForNonStrict

      public static <B> Class<? extends Builder<B>> builderForNonStrict(B built)
      The same as builderFor(Object) except that it won't throw an exception if no builder class is found. Instead null will be returned.
      Type Parameters:
      B - The type of builder
      Parameters:
      built - The instance to find the builder for
      Returns:
      The builder for this instance or null if there isn't one