# setMainApplicationClass method

1. @override

void setMainApplicationClass(

1. Class<Object> mainApplicationClass

)
override

Sets the main application class.

This method configures the primary application class that serves as the bootstrap entry point and configuration source.

### Framework Integration:

- Used for component scanning base package determination
- Provides metadata for banner display and version information
- Serves as reference for configuration class detection
- Used in logging and monitoring context identification

### Example:

    @Configuration
    @ComponentScan
    class MyApplication {
      // Application configuration
    }

    void main() {
      final context = GenericApplicationContext();
      context.setMainApplicationClass(Class<MyApplication>());
      await context.refresh();
    }

## Implementation

    @override
    void setMainApplicationClass(Class<Object> mainApplicationClass) {
      _mainApplicationClass = mainApplicationClass;
    }