public class ExecArgList
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ExecArgList.Builder
Builder class
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
asFlatStringArray()
Flatten the list of arguments into an array
|
java.util.ArrayList<java.lang.String> |
asFlatStringList()
Flatten the list of arguments into a list
|
java.util.ArrayList<java.lang.String> |
buildCommandForNode(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dataContext,
java.lang.String osFamily)
Generate the quoted and expanded argument list, by expanding property values given the data context, and quoting
for the given OS
|
static ExecArgList.Builder |
builder()
Create a Builder
|
static ExecArgList |
fromStrings(boolean quoted,
java.lang.String... args) |
static ExecArgList |
fromStrings(java.util.List<java.lang.String> strings,
boolean quoted)
Create an ExecArgList from a list of strings
|
static ExecArgList |
fromStrings(org.apache.commons.collections.Predicate quoteDetect,
java.lang.String... args)
Create an ExecArgList from a list of strings, and a predicate to determine whether the argument needs to be
quoted
|
java.util.List<ExecArg> |
getList()
Return the list of ExecArg objects
|
static java.lang.String |
joinAndQuote(java.util.List<java.lang.String> commandList1,
Converter<java.lang.String,java.lang.String> quote)
Join a list of strings and then quote the entire string, if specified
|
void |
visitWith(ExecArg.Visitor visitor)
Visit with a visitor
|
public static ExecArgList fromStrings(boolean quoted, java.lang.String... args)
public static ExecArgList fromStrings(org.apache.commons.collections.Predicate quoteDetect, java.lang.String... args)
quoteDetect
- args
- public static ExecArgList fromStrings(java.util.List<java.lang.String> strings, boolean quoted)
strings
- the stringsquoted
- whether they are each quotedpublic java.util.List<ExecArg> getList()
public java.lang.String[] asFlatStringArray()
public java.util.ArrayList<java.lang.String> asFlatStringList()
public static java.lang.String joinAndQuote(java.util.List<java.lang.String> commandList1, Converter<java.lang.String,java.lang.String> quote)
commandList1
- quote
- public java.util.ArrayList<java.lang.String> buildCommandForNode(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dataContext, java.lang.String osFamily)
dataContext
- property value data contextosFamily
- OS family to determine quotingpublic static ExecArgList.Builder builder()
public void visitWith(ExecArg.Visitor visitor)
visitor
-