Interface EnvironmentNamesDeducer


public interface EnvironmentNamesDeducer
A strategy interface for deducing environment names. Implementations of this interface determine the set of environment names based on specific criteria or configurations. This interface is useful for frameworks and applications that need to dynamically identify or configure themselves based on the current runtime environment. The default implementation, NONE, provides an empty set of environment names, effectively disabling any environment deduction.
Since:
5.0
Author:
Denis Stepanov
  • Field Details

    • NONE

      static final EnvironmentNamesDeducer NONE
      A default implementation of EnvironmentNamesDeducer that provides an empty set of environment names. This effectively disables any environment name deduction. Use this implementation when no environment-specific configuration or deduction is required.
  • Method Details

    • deduceEnvironmentNames

      @NonNull @NonNull Set<String> deduceEnvironmentNames()
      Deduces and returns a set of environment names based on the implemented strategy. The returned set can be used to identify the current runtime environment, e.g., development, staging, production, etc.
      Returns:
      a non-null set of environment names, which may be empty if no environment names can be deduced.