dev.jbang.cli.JdkProvidersMixin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jbang-cli Show documentation
Show all versions of jbang-cli Show documentation
JBang Command Line Interface
The newest version!
package dev.jbang.cli;
import java.util.ArrayList;
import java.util.List;
import dev.jbang.net.JdkManager;
import picocli.CommandLine;
public class JdkProvidersMixin {
@CommandLine.Option(names = {
"--jdk-providers" }, description = "Use the given providers to check for installed JDKs", split = ",", hidden = true)
List jdkProviders;
protected void initJdkProviders() {
if (jdkProviders != null && !jdkProviders.isEmpty()) {
JdkManager.initProvidersByName(jdkProviders);
}
}
public List opts() {
List opts = new ArrayList<>();
if (jdkProviders != null) {
for (String p : jdkProviders) {
opts.add("--jdk-providers");
opts.add(p);
}
}
return opts;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy