Interface SystemPropertyResolver

All Known Implementing Classes:
ConfigPropertyResolver, SystemPropertyResolver.Default

public interface SystemPropertyResolver
An abstraction that allows us to make system property resolution customizable.
Author:
as 2019.10.11
  • Method Details

    • getProperty

      String getProperty(String sPropertyName)
      Return the value of the specified system property.
      Parameters:
      sPropertyName - the name of the property to return
      Returns:
      the value of the specified system property
    • getProperty

      default String getProperty(String sPropertyName, String sDefaultValue)
      Return the value of the specified system property, or the specified default value if the property doesn't exist.
      Parameters:
      sPropertyName - the name of the property to return
      sDefaultValue - the default value to return if the property doesn't exist
      Returns:
      the value of the specified system property, or the specified default value if the property doesn't exist
    • getInstance

      static SystemPropertyResolver getInstance()
      Return an instance of a SystemPropertyResolver discovered by the ServiceLoader, or a default instance if none are discovered.
      Returns:
      an instance of a SystemPropertyResolver