# get abstract method

Future<ObjectHolder<Object>> get(

1. String name,
2. ObjectFactory<Object> factory

)

Return the object with the given name from the underlying scope, creating it if not found in the underlying storage mechanism.

This is the primary method for obtaining objects from a scope. The scope implementation determines the lifecycle semantics:

- Singleton: returns the same instance always
- Prototype: creates new instance each time
- Request/Session: returns instance specific to current context

`name`: The name of the object to retrieve or create `factory`: Factory function to create the object if it doesn't exist in the scope. The factory is only called if needed. Returns the object instance from the scope, either existing or newly created

Throws:

- IllegalArgumentException if name is null or empty
- `ScopeException` if the object cannot be created or retrieved

Example:

    // Get or create a pod from the scope
    final userService = scope.get('userService', () {
      final service = UserService();
      // Perform any initialization
      service.initialize();
      return service;
    });

    // Use the scoped object
    userService.processRequest();

## Implementation

    Future<ObjectHolder<Object>> get(String name, ObjectFactory<Object> factory);