The base interface for all JetLeaf condition evaluators.
A Condition defines a contract for determining whether a pod, component, or configuration element should be processed and included in the application context based on runtime metadata, environment properties, or other contextual information.
Implementations of Condition are used in combination with annotations such as ConditionalOnProperty, ConditionalOnClass, ConditionalOnProfile, ConditionalOnPod, and others. JetLeaf evaluates these conditions during pod registration or configuration scanning to control which elements are active in the current application context.
Responsibilities
- Evaluate runtime or static conditions against a given ConditionalContext.
- Return
trueif the annotated element should be included,falseotherwise. - Integrate seamlessly with annotations for declarative conditional logic.
- Provide detailed trace logging (optional) to aid debugging of configuration evaluation flows.
Related Components
- ConditionalContext: Provides access to environment properties, active profiles, pod factory, and runtime information required for condition evaluation.
Annotation: The metadata that is being conditionally evaluated.Source: The annotated element (class, method, or field) that the condition applies to.- JetLeaf condition implementations such as OnClassCondition, OnPropertyCondition, OnProfileCondition, OnDartCondition, OnPodCondition, OnAssetCondition, and OnExpressionCondition.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
matches(
ConditionalContext context, Annotation annotation, Source source) → Future< bool> -
Evaluates the condition against the given ConditionalContext and
annotationfor the specifiedSource. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited