supports method
Returns whether this context supports the given applicationType.
This method allows the framework and application code to determine what kind of application environment this context is designed for.
Common Application Types:
- ApplicationType.WEB: Web applications with HTTP server support
- ApplicationType.NONE: Standalone applications without web stack
ApplicationType.BATCH: Batch processing applicationsApplicationType.CLI: Command-line interface applications
Usage:
if (context.supports(ApplicationType.WEB)) {
// Configure web-specific components
context.registerPod(WebController);
context.registerPod(RequestMappingHandler);
} else if (context.supports(ApplicationType.CLI)) {
// Configure CLI-specific components
context.registerPod(CommandLineRunner);
context.registerPod(CommandProcessor);
}
Implementation
@override
bool supports(ApplicationType applicationType) => applicationType == ApplicationType.NONE;