Class 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.
    • Constructor Detail

      • ExecArg

        public ExecArg()
    • 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)