# applyBeforeInstantiationProcessing method

1. @protected

Future<Object?> applyBeforeInstantiationProcessing(

1. String podName,
2. PodDefinition root

)

Applies post-processing to a pod instance before its initialization.

This method is used to apply post-processing to a pod instance before its initialization. It is called by create and getObject methods.

@param podName The name of the pod being created @param root The pod definition @return The processed pod instance

## Implementation

    @protected
    Future<Object?> applyBeforeInstantiationProcessing(String podName, PodDefinition root) async {
      Object? pod;

      if (!root.design.isInfrastructure && hasInstantiationPodPostProcessors()) {
        for (PodInstantiationProcessor processor in getPodProcessorCacheManager().instantiation) {
          pod = await processor.processBeforeInstantiation(root.type, podName);
          if (pod != null) {
            return pod;
          }
        }
      }

      return pod;
    }