# checkDependencies method

1. @protected

void checkDependencies(

1. String podName,
2. RootPodDefinition root,
3. PodHolder ph,
4. MutablePropertyValues pvs,

)

Checks if all dependencies are satisfied for the pod instance.

Throws an exception if required dependencies are missing.

@param podName The name of the pod @param root The pod definition @param ph The pod holder @param pvs The property values

## Implementation

    @protected
    void checkDependencies(String podName, RootPodDefinition root, PodHolder ph, MutablePropertyValues pvs) {
      int dependencyCheck = root.dependencyCheck.value;
      final unsatisfiedProperties = getUnsatisfiedNonSimpleProperties(root, ph);

      for (final property in unsatisfiedProperties.entries) {
        if (!pvs.contains(property.key)) {
          final returnClass = ph.$2.getField(property.key)?.getReturnClass();
          final isSimple = returnClass?.isPrimitive() ?? false;

          if (!isSimple && (dependencyCheck == DependencyCheck.ALL.value || dependencyCheck == DependencyCheck.OBJECTS.value)) {
            throw PodCreationException.withResource(
              root.description,
              podName,
              "Unsatisfied dependency of type '${returnClass?.getName()}' for property '${property.key}'"
            );
          }
        }
      }
    }