# ConditionalOnPod class

The `ConditionalOnPod` annotation in Jetleaf allows developers to conditionally process classes or methods based on the presence of specific pods in the application context.

This is especially useful when you want a configuration, service, or pod to only be loaded if another pod (or set of pods) already exists. Conditions can be defined by pod type, annotation, or name.

### Key Features:

- Require specific pod types to exist in the context.
- Require pods annotated with certain annotations.
- Require pods with given names.

### Usage Examples:

    // Require a specific pod type
    @ConditionalOnPod(types: [ClassType<DataSource>()])
    class JdbcTemplateConfig {}

    // Require a pod with a specific name
    @ConditionalOnPod(names: ['myCustomService'])
    class FallbackServiceConfig {}

Using this annotation ensures your configuration or pods are only registered when the expected pods are already available in the Jetleaf context.

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

## Constructors

ConditionalOnPod.new({List<ClassType<Object>> types = const [], List<String> names = const []})
  The `ConditionalOnPod` annotation in Jetleaf allows developers to conditionally process classes or methods based on the presence of specific pods in the application context.
  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>
  Pod names that must be present in the context.
  final
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited
types → List<ClassType<Object>>
  Pod types that must be present in the context.
  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