Class ToggeableCondition
java.lang.Object
io.micronaut.objectstorage.configuration.ToggeableCondition
- All Implemented Interfaces:
io.micronaut.context.condition.Condition
,Predicate<io.micronaut.context.condition.ConditionContext>
@Internal
public class ToggeableCondition
extends Object
implements io.micronaut.context.condition.Condition
Condition to check whether a bean should be enabled based on
Toggleable
configuration.- Since:
- 2.0.2
- Author:
- Álvaro Sánchez-Mariscal
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
matches
(@NonNull io.micronaut.context.condition.ConditionContext<?> context, @NonNull Class<? extends io.micronaut.core.util.Toggleable> configurationClass) Check whether a specific condition is met.boolean
matches
(io.micronaut.context.condition.ConditionContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.context.condition.Condition
test
-
Constructor Details
-
ToggeableCondition
public ToggeableCondition()
-
-
Method Details
-
matches
public boolean matches(io.micronaut.context.condition.ConditionContext context) - Specified by:
matches
in interfaceio.micronaut.context.condition.Condition
-
matches
public static boolean matches(@NonNull @NonNull io.micronaut.context.condition.ConditionContext<?> context, @NonNull @NonNull Class<? extends io.micronaut.core.util.Toggleable> configurationClass) Check whether a specific condition is met.- Parameters:
context
- The condition contextconfigurationClass
- AToggleable
configuration class.- Returns:
- True if has been met
-