public interface CommandLineToolProvider
Modifier and Type | Method and Description |
---|---|
static CommandLineToolProvider |
from(Supplier<CommandLineTool> toolSupplier)
Creates a provider from the specified command line tool supplier.
|
CommandLineTool |
get()
Returns the command line tool provided by this provider.
|
boolean |
isAvailable()
Returns the availability of the command line tool providered.
|
static CommandLineToolProvider |
of(CommandLineTool tool)
Creates a fixed provider of the specified command line tool.
|
static CommandLineToolProvider |
unavailable()
Creates an unavailable provider.
|
CommandLineTool get()
CommandLineTool
instance or throws IllegalArgumentException
if no command line tool can be provided.boolean isAvailable()
true
if the command line tool is available or false
otherwise.static CommandLineToolProvider of(CommandLineTool tool)
get()
will return the specified command line tool.tool
- a command line tool to provide.CommandLineToolProvider
instance for the specified toolstatic CommandLineToolProvider unavailable()
get()
will throw an exception.CommandLineToolProvider
instance that is unavailable.static CommandLineToolProvider from(Supplier<CommandLineTool> toolSupplier)
get()
will throw an exception only if the supplier returns null.toolSupplier
- a supplier for the tool provided.CommandLineToolProvider
instance for the specified tool supplier.