# getPodClass method

1. @override

Future<Class> getPodClass(

1. String name

)
override

Retrieves the Class object for the specified pod name.

This method is useful for reflection-based operations or when you need to inspect the type of a pod at runtime.

## Usage Example:

    final podClass = await factory.getPodClass('userRepository');
    print('Pod class: ${podClass.name}');

@param podName The name of the pod to get the class for @return A Future that completes with the Class object of the pod

## Implementation

    @override
    Future<Class> getPodClass(String name) async {
      Class? type;

      if (containsDefinition(name)) {
        final podDef = getDefinition(name);

        if (podDef is AbstractPodDefinition) {
          if (podDef.getPodExpression() != null) {
            final podClass = await _resolvePodClass(podDef);
            if(podClass != null) {
              type = podClass;
            }
          }
        }

        if (type == null) {
          type = podDef.type;
        }
      }

      if (type == null && containsSingleton(name)) {
        type = getSingletonClass(name);
      }

      final parent = getParentFactory();
      if (parent != null && type == null) {
        return await parent.getPodClass(name);
      }

      if (type == null) {
        throw PodDefinitionStoreException(
          name: name,
          resourceDescription: null,
          msg: "No pod named '$name' is defined"
        );
      }

      return type;
    }