# ConditionalOnClass class

The `ConditionalOnClass` annotation in Jetleaf allows developers to conditionally process a class or method only when certain classes are present in the runtime classpath.

This is useful for optional dependencies, integration with external libraries, or conditional configuration based on class availability.

### Usage Examples:

    // Only load HTTP client configuration if HttpClient exists
    @ConditionalOnClass(value: [ClassType<HttpClient>()])
    class HttpClientAutoConfig {}

    // Use fully qualified class names to avoid compilation errors
    @ConditionalOnClass(name: ['package:jetleaf/example/jetleaf_example.dart.LoggingService'])
    class OptionalFeatureConfig {}

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

## Constructors

ConditionalOnClass.new({List<ClassType<Object>> value = const [], List<String> names = const []})
  The `ConditionalOnClass` annotation in Jetleaf allows developers to conditionally process a class or method only when certain classes are present in the runtime classpath.
  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
names → List<String>
  ClassType names (fully qualified) that must be present at runtime.
  final
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited
value → List<ClassType<Object>>
  Classes that must be present at runtime.
  final

## 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