Package io.micronaut.context.env
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final EnvironmentNamesDeducerA default implementation ofEnvironmentNamesDeducerthat provides an empty set of environment names. -
Method Summary
Modifier and TypeMethodDescriptionDeduces and returns a set of environment names based on the implemented strategy.
-
Field Details
-
NONE
A default implementation ofEnvironmentNamesDeducerthat 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
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.
-