Class FeatureConditionProcessor

java.lang.Object
ovh.mythmc.gestalt.annotations.conditions.FeatureConditionProcessor

public final class FeatureConditionProcessor extends Object
Evaluates whether a
invalid reference
Feature
-annotated class satisfies all conditions required to be enabled.

Conditions are checked via:

  • Constructor Details

    • FeatureConditionProcessor

      public FeatureConditionProcessor(@NotNull @NotNull Gestalt gestalt)
      Constructs a new FeatureConditionProcessor for the given Gestalt instance.
      Parameters:
      gestalt - the active Gestalt instance
  • Method Details

    • canBeEnabled

      public boolean canBeEnabled(@NotNull @NotNull Class<?> clazz)
      Determines whether the given feature class satisfies all conditions required to be enabled.

      Returns false if any condition check throws an exception, logging the stack trace.

      Parameters:
      clazz - the feature class to evaluate
      Returns:
      true if all conditions are met, false otherwise