Class PropertiesUtil.Environment

  • Enclosing class:
    PropertiesUtil

    private static class PropertiesUtil.Environment
    extends java.lang.Object
    Provides support for looking up global configuration properties via environment variables, property files, and system properties, in three variations:

    Normalized: all log4j-related prefixes removed, remaining property is camelCased with a log4j2 prefix for property files and system properties, or follows a LOG4J_FOO_BAR format for environment variables.

    Legacy: the original property name as defined in the source pre-2.10.0.

    Tokenized: loose matching based on word boundaries.

    Since:
    2.10.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<java.lang.CharSequence,​java.lang.String> literal  
      private java.util.Map<java.lang.CharSequence,​java.lang.String> normalized  
      private java.util.Set<PropertySource> sources  
      private java.util.Map<java.util.List<java.lang.CharSequence>,​java.lang.String> tokenized  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean containsKey​(java.lang.String key)  
      private java.lang.String get​(java.lang.String key)  
      private static boolean hasSystemProperty​(java.lang.String key)  
      private void reload()  
      • Methods inherited from class java.lang.Object

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

      • literal

        private final java.util.Map<java.lang.CharSequence,​java.lang.String> literal
      • normalized

        private final java.util.Map<java.lang.CharSequence,​java.lang.String> normalized
      • tokenized

        private final java.util.Map<java.util.List<java.lang.CharSequence>,​java.lang.String> tokenized
    • Constructor Detail

    • Method Detail

      • reload

        private void reload()
      • hasSystemProperty

        private static boolean hasSystemProperty​(java.lang.String key)
      • get

        private java.lang.String get​(java.lang.String key)
      • containsKey

        private boolean containsKey​(java.lang.String key)