Class StatusLogger.PropertiesUtilsDouble

  • Enclosing class:
    StatusLogger

    static final class StatusLogger.PropertiesUtilsDouble
    extends java.lang.Object
    This is a thin double of PropertiesUtil.

    We could have used PropertiesUtil, PropertyFilePropertySource, etc. Consequently, they would delegate to LoaderUtil, etc. All these mechanisms expect a working StatusLogger. In order to be self-sufficient, we cannot rely on them, hence this double.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static boolean isRelevantPropertyName​(@Nullable java.lang.Object propertyName)
      Filter to exclude irrelevant property names (i.e., non-string and not log4j-prefixed) to speed up matching.
      private static java.util.Map<java.lang.String,​java.lang.Object> normalizeProperties​(java.util.Properties... propertiesList)  
      private static java.lang.String normalizePropertyName​(java.lang.String propertyName)
      An imperfect property name normalization routine.
      (package private) static java.util.Map<java.lang.String,​java.lang.Object> readAllAvailableProperties()  
      private static java.util.Properties readEnvironmentProperties()  
      (package private) static java.util.Properties readPropertiesFile​(java.lang.String propertiesFileName)  
      (package private) static @Nullable java.lang.String readProperty​(java.util.Map<java.lang.String,​java.lang.Object> normalizedProperties, java.lang.String propertyName)  
      • Methods inherited from class java.lang.Object

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

      • PropertiesUtilsDouble

        PropertiesUtilsDouble()
    • Method Detail

      • readProperty

        static @Nullable java.lang.String readProperty​(java.util.Map<java.lang.String,​java.lang.Object> normalizedProperties,
                                                       java.lang.String propertyName)
      • readAllAvailableProperties

        static java.util.Map<java.lang.String,​java.lang.Object> readAllAvailableProperties()
      • readEnvironmentProperties

        private static java.util.Properties readEnvironmentProperties()
      • readPropertiesFile

        static java.util.Properties readPropertiesFile​(java.lang.String propertiesFileName)
      • normalizeProperties

        private static java.util.Map<java.lang.String,​java.lang.Object> normalizeProperties​(java.util.Properties... propertiesList)
      • isRelevantPropertyName

        private static boolean isRelevantPropertyName​(@Nullable java.lang.Object propertyName)
        Filter to exclude irrelevant property names (i.e., non-string and not log4j-prefixed) to speed up matching.
        Parameters:
        propertyName - a property name
        Returns:
        true, if the property name is relevant; false, otherwise
      • normalizePropertyName

        private static java.lang.String normalizePropertyName​(java.lang.String propertyName)
        An imperfect property name normalization routine.

        It is imperfect, because foo.bar would match with fo.obar. But it is good enough for the StatusLogger needs.

        Parameters:
        propertyName - the input property name
        Returns:
        the normalized property name