dev.jbang.spi.IntegrationResult 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.spi;
import java.nio.file.Path;
import java.util.List;
public class IntegrationResult {
public final Path nativeImagePath;
public final String mainClass;
public final List javaArgs;
public IntegrationResult(Path nativeImagePath, String mainClass, List javaArgs) {
this.nativeImagePath = nativeImagePath;
this.mainClass = mainClass;
this.javaArgs = javaArgs;
}
public IntegrationResult merged(IntegrationResult ir) {
if (ir.nativeImagePath == null && ir.mainClass == null && ir.javaArgs == null) {
return this;
} else if (nativeImagePath == null && mainClass == null && javaArgs == null) {
return ir;
} else {
return new IntegrationResult(
nativeImagePath != null ? nativeImagePath : ir.nativeImagePath,
mainClass != null ? mainClass : ir.mainClass,
javaArgs != null ? javaArgs : ir.javaArgs);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy