All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.g2forge.alexandria.command.CommandInvocation Maven / Gradle / Ivy

There is a newer version: 0.0.18
Show newest version
package com.g2forge.alexandria.command;

import java.io.InputStream;
import java.io.PrintStream;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;

import com.g2forge.alexandria.command.stdio.IStandardIO;
import com.g2forge.alexandria.command.stdio.StandardIO;
import com.g2forge.alexandria.java.core.helpers.HCollection;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Singular;

@Data
@Builder(toBuilder = true)
@AllArgsConstructor
public class CommandInvocation {
	public static final CommandInvocation of(String... args) {
		final CommandInvocation.CommandInvocationBuilder retVal = CommandInvocation.builder();
		retVal.arguments(HCollection.asList(args));
		retVal.io(StandardIO.of());
		retVal.working(Paths.get(System.getProperty("user.dir")));
		return retVal.build();
	}

	@Singular
	protected final List arguments;

	protected final IStandardIO io;

	protected final Path working;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy