ConditionalOnExpression class
The ConditionalOnExpression
annotation in Jetleaf allows developers
to conditionally process a class or method based on a runtime expression.
This annotation uses OnExpressionCondition
to evaluate the expression
provided as a string. If the expression evaluates to true
, the annotated
element is processed.
Usage Example:
@ConditionalOnExpression('env["ENABLE_FEATURE"] == "true"')
class FeaturePod {
// This pod will only be loaded if the expression evaluates to true
}
- Annotations
-
- @Conditional([ClassType<OnExpressionCondition>()])
- @Target.new({TargetKind.classType, TargetKind.method})
Constructors
- ConditionalOnExpression(Object expression)
-
The
ConditionalOnExpression
annotation in Jetleaf allows developers to conditionally process a class or method based on a runtime expression.const
Properties
- annotationType → Type
-
Returns the annotation _type of this annotation.
no setter
- expression → Object
-
The expression to evaluate for determining if the annotated element
should be processed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
equalizedProperties(
) → List< Object?> -
Mixin-style contract for value-based equality,
hashCode
, andtoString
. -
equals(
Object other) → bool -
Checks whether the given object is logically equivalent to this annotation.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String - Returns a string representation of this annotation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited