io.quarkus.picocli.runtime.PicocliCommandLineProducer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-picocli Show documentation
Show all versions of quarkus-picocli Show documentation
Develop command line applications with Picocli
package io.quarkus.picocli.runtime;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Singleton;
import io.quarkus.arc.DefaultBean;
import io.quarkus.runtime.annotations.CommandLineArguments;
import picocli.CommandLine;
@ApplicationScoped
public class PicocliCommandLineProducer {
@Produces
@Singleton
public CommandLine.IFactory picocliFactory() {
return new PicocliBeansFactory();
}
@Produces
@DefaultBean
public CommandLine picocliCommandLine(PicocliCommandLineFactory picocliCommandLineFactory) {
return picocliCommandLineFactory.create();
}
@Produces
public CommandLine.ParseResult picocliParseResult(CommandLine commandLine, @CommandLineArguments String[] args) {
return commandLine.parseArgs(args);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy