Class ExecArg
- java.lang.Object
-
- com.dtolabs.rundeck.core.execution.ExecArg
-
public abstract class ExecArg extends java.lang.Object
Represents a command-line argument, that may need to be quoted/escaped before use, and may contain a list of other arguments to be quoted.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ExecArg.Visitor
Visitor to visit args
-
Constructor Summary
Constructors Constructor Description ExecArg()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
accept(ExecArg.Visitor converter)
Accept a visitorstatic ExecArg
fromString(java.lang.String arg, boolean quoted, boolean featureQuotingBackwardCompatible)
abstract java.util.List<ExecArg>
getList()
abstract java.lang.String
getString()
boolean
isFeatureQuotingBackwardCompatible()
abstract boolean
isList()
boolean
isQuoted()
-
-
-
Method Detail
-
isList
public abstract boolean isList()
- Returns:
- true if this arg contains a list of other args
-
getList
public abstract java.util.List<ExecArg> getList()
- Returns:
- the sublist of args, if
isList()
returns true, null otherwise
-
getString
public abstract java.lang.String getString()
- Returns:
- the string value of this argument if
isList()
returns false, null otherwise
-
accept
public abstract void accept(ExecArg.Visitor converter)
Accept a visitor- Parameters:
converter
- visitor
-
isQuoted
public boolean isQuoted()
- Returns:
- true if this arg should be quoted
-
isFeatureQuotingBackwardCompatible
public boolean isFeatureQuotingBackwardCompatible()
- Returns:
- true if should use old quoting behavior < 3.4.1
-
fromString
public static ExecArg fromString(java.lang.String arg, boolean quoted, boolean featureQuotingBackwardCompatible)
-
-