Class ConfigurationUtils
java.lang.Object
org.infinispan.commons.configuration.ConfigurationUtils
ConfigurationUtils. Contains utility methods used in configuration
- Since:
- 5.2
- Author:
- Tristan Tarrant
-
Method Summary
Modifier and TypeMethodDescriptionbuilderFor
(B built) Returns the builder that was used to build this class.builderForNonStrict
(B built) The same asbuilderFor(Object)
except that it won't throw an exception if no builder class is found.
-
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 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
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
-