# getMainApplicationClass method

1. @override

Class<Object> getMainApplicationClass()
override

Returns the main application class.

This is the class that was used to bootstrap the application and serves as the primary configuration source and entry point.

### Framework Usage:

- Component Scanning: Base package for annotation scanning
- Configuration Detection: Source for `@Configuration` classes
- Banner Display: Used in startup banner presentation
- Metadata Access: Provides application metadata and version info

### Example:

    final mainClass = context.getMainApplicationClass();

    print('Main application class: ${mainClass.getSimpleName()}');
    print('Package: ${mainClass.getPackage()?.getName()}');

    // Check for specific annotations
    if (mainClass.hasAnnotation<JetLeafApplication>()) {
      print('This is a JetLeaf application');
    }

## Implementation

    @override
    Class<Object> getMainApplicationClass() {
      if(_mainApplicationClass == null) {
        throw IllegalStateException("Cannot access main application class since it has not been initialized yet.");
      }

      return _mainApplicationClass!;
    }