# ConditionalOnProperty class

Marks a class or method as conditional based on the presence and value of configuration properties.

This annotation is used to include or exclude a class based on one or more environment or system properties. It is commonly used in auto-configuration or module activation scenarios.

### Matching Rules

- You can specify multiple names via `names`.
- If `havingValue` is specified, the property must match that value.
- If `havingValue` is omitted, the property must not be equal to `'false'`.
- If the property is missing and `matchIfMissing` is `true`, it will match.

### Example

    @ConditionalOnProperty(
      prefix: 'server',
      names: ['ssl.enabled', 'ssl.enabled2'],
      havingValue: 'true',
    )
    class SslServerConfig {}

This activates `SslServerConfig` only if `server.ssl.enabled=true`.

Inheritance
  - Object
  - ReflectableAnnotation
  - ConditionalOnProperty
Mixed-in types
  - EqualsAndHashCode
Annotations
  - @Conditional([ClassType<OnPropertyCondition>()])
  - @Target({TargetKind.classType, TargetKind.method})

## Constructors

ConditionalOnProperty.new({String? prefix, List<String> names = const [], String? havingValue, bool matchIfMissing = false})
  Marks a class or method as conditional based on the presence and value of configuration properties.
  const

## Properties

annotationType → Type
  Returns the annotation _type of this annotation.
  no setter override
hashCode → int
  The hash code for this object.
  no setter inherited
havingValue → String?
  The expected value the property must equal for the condition to match.
  final
matchIfMissing → bool
  Whether to match even if the property is not set.
  final
names → List<String>
  Alternative to `name`; defines multiple property names to match.
  final
prefix → String?
  Optional prefix to prepend to the property name(s).
  final
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited

## Methods

equalizedProperties() → List<Object?>
  Mixin-style contract for value-based equality, `hashCode`, and `toString`.
  override
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.
  override

## Operators

operator ==(Object other) → bool
  The equality operator.
  inherited