DefaultApplicationArguments constructor

DefaultApplicationArguments(
  1. List<String> args
)

Default implementation of ApplicationArguments that wraps command-line arguments and exposes them via a PropertySource-based backing system.

This class uses SimpleCommandLinePropertySource internally to parse arguments, exposing both options and non-option arguments in a read-only fashion.

Example usage:

final args = DefaultApplicationArguments(['--env=prod', '--debug', 'input.txt']);

print(args.getSourceArgs()); // ['--env=prod', '--debug', 'input.txt']
print(args.getOptionNames()); // {'env', 'debug'}
print(args.containsOption('debug')); // true
print(args.getOptionValues('env')); // ['prod']
print(args.getNonOptionArgs()); // ['input.txt']

This is typically used within the JetLeaf application context during startup to extract configuration flags passed to the executable.

Implementation

DefaultApplicationArguments(this.args) {
  source = _Source(args);
}