# getMergedPodDefinition method

1. @override

RootPodDefinition getMergedPodDefinition(

1. String name

)
override

Retrieves the merged pod definition for the specified pod name.

Merged definitions combine parent and child definitions in hierarchical configurations.

## Usage Example:

    final definition = factory.getMergedPodDefinition('dataService');
    print('Pod class: ${definition.podClass}');

@param podName The name of the pod to get the definition for @return The merged root pod definition

## Implementation

    @override
    RootPodDefinition getMergedPodDefinition(String name) {
      final transformed = transformedPodName(name);

      // Efficiently check whether pod definition exists in this provider.
      final parent = getParentFactory();
      if (parent is ConfigurablePodFactory && !containsDefinition(transformed)) {
        return parent.getMergedPodDefinition(transformed);
      }

      return synchronized(_mergedPodDefinitions, () {
        if (!containsDefinition(transformed)) {
          throw NoSuchPodDefinitionException.byName(transformed);
        }

        final podDefinition = getDefinition(transformed);
        final definition = RootPodDefinition.from(podDefinition);

        if(isCachePodMetadata() || isPodEligibleForMetadataCaching(transformed)) {
          cacheMergedPodDefinition(definition, transformed);
        }

        definition.setIsStale(false);

        return definition;
      });
    }