Class ConfigurationCondition

java.lang.Object
dev.voidframework.core.conditionalfeature.condition.ConfigurationCondition
All Implemented Interfaces:
Condition

public class ConfigurationCondition extends Object implements Condition
Indicates that the feature will only be loaded if the condition is met. The value is retrieved from the configuration, properties or environment variables.
Since:
1.5.0
  • Constructor Details

    • ConfigurationCondition

      public ConfigurationCondition()
  • Method Details

    • isEnabled

      public boolean isEnabled(com.typesafe.config.Config configuration, Class<?> annotatedClassType, AnnotationMetadata annotationMetadata)
      Description copied from interface: Condition
      Checks if the feature must be enabled or not.
      Specified by:
      isEnabled in interface Condition
      Parameters:
      configuration - The application configuration
      annotatedClassType - Class type of the annotated class
      annotationMetadata - Annotation metadata
      Returns:
      true if feature must be enabled, otherwise, false