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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <B> Class<? extends Builder<B>>
builderFor(B built)
Returns the builder that was used to build this class.static <B> Class<? extends Builder<B>>
builderForNonStrict(B built)
The same asbuilderFor(Object)
except that it won't throw an exception if no builder class is found.
-
-
-
Method Detail
-
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 aBuiltBy
annotation present on it. If one is not present aCacheConfigurationException
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 asbuilderFor(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
-
-