Class ConfigurationUtils


  • public final class ConfigurationUtils
    extends java.lang.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> java.lang.Class<? extends Builder<B>> builderFor​(B built)
      Returns the builder that was used to build this class.
      static <B> java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • builderFor

        public static <B> java.lang.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> java.lang.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