Class HierarchicalPropertiesEvaluator


  • public final class HierarchicalPropertiesEvaluator
    extends Object
    • Method Detail

      • evaluate

        public static boolean evaluate​(org.springframework.context.ApplicationContext applicationContext,
                                       String... prefixes)
        Determine the value of the "enabled" flag for a hierarchy of properties.
        Parameters:
        applicationContext - the spring ApplicationContext
        prefixes - an ordered list of prefixed (less restrictive to more restrictive)
        Returns:
        the value of the key `enabled` for most restrictive prefix
      • evaluate

        public static boolean evaluate​(org.springframework.core.env.Environment environment,
                                       String... prefixes)
        Determine the value of the "enabled" flag for a hierarchy of properties.
        Parameters:
        environment - the environment
        prefixes - an ordered list of prefixed (less restrictive to more restrictive)
        Returns:
        the value of the key `enabled` for most restrictive prefix
      • evaluate

        public static boolean evaluate​(org.springframework.core.env.Environment environment,
                                       Collection<String> prefixes)
        Determine the value of the "enabled" flag for a hierarchy of properties.
        Parameters:
        environment - the environment
        prefixes - an ordered list of prefixed (less restrictive to more restrictive)
        Returns:
        the value of the key `enabled` for most restrictive prefix