Cli helper utilities.
| Type Params | Return Type | Name and description |
|---|---|---|
|
static boolean |
isVersionMatch(java.lang.String version, java.lang.String required)@param version checked version in format major.minor.micro |
|
static java.lang.String[] |
mergeArgs(java.lang.Object args1, java.lang.Object args2)Merge arguments. |
|
static java.lang.String[] |
parseArgs(java.lang.Object args)Parse arguments from multiple formats. |
|
static java.lang.String[] |
parseCommandLine(java.lang.String command)Parse arguments from simple string. |
|
static java.lang.String |
prefixOutput(java.lang.String output, java.lang.String prefix)Apply prefix for all lines in incoming string. |
|
static java.lang.String[] |
wincmdArgs(java.lang.String executable, java.io.File projectHome, java.lang.String[] args, boolean workDirUsed)Prepare arguments to call python with cmd. |
|
static java.lang.String |
wrapCommand(java.lang.String command)Wraps command ('-c print('smth')') into exec() for linux: '-c "print('smth')"' will not be called on linux at all (when used from java). |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
version - checked version in format major.minor.microrequired - version constraint (could be null)Merge arguments.
args1 - array, collection or simple string (null allowed)args2 - array, collection or simple string (null allowed)Parse arguments from multiple formats.
args - array, collection or stringParse arguments from simple string. Support quotes (but not nested).
command - arguments stringApply prefix for all lines in incoming string.
output - string to apply prefixprefix - lines prefixPrepare arguments to call python with cmd.
executable - python executableprojectHome - project home directoryargs - python argumentsWraps command ('-c print('smth')') into exec() for linux: '-c "print('smth')"' will not be called on linux at all (when used from java).
command - command expression to wrap