Class ShellInterpreter.ParseResult

java.lang.Object
com.aoapps.hodgepodge.util.ShellInterpreter.ParseResult
Enclosing class:
ShellInterpreter

public static class ShellInterpreter.ParseResult extends Object
The result of a parsing pass.
  • Method Details

    • getRawArgs

      public String[] getRawArgs()
      The raw arguments, with all original characters unmodified. None of the elements can be an empty string, even if it represents an empty argument once decoded.
      Returns:
      The array without any defensive copying.

      When an empty array, returns EmptyArrays.EMPTY_STRING_ARRAY.

      When an argument is identical in raw and decoded forms, the element in both rawArgs and args will be the same String instance.

      When all arguments are identical in both rawArgs and args, the same String[] instance is returned.

    • getArgs

      public String[] getArgs()
      The resulting arguments, with backslash escapes decoded. Some of the elements can be an empty string representing an empty argument.
      Returns:
      The array without any defensive copying.

      When an empty array, returns EmptyArrays.EMPTY_STRING_ARRAY.

      When an argument is identical in raw and decoded forms, the element in both rawArgs and args will be the same String instance.

      When all arguments are identical in both rawArgs and args, the same String[] instance is returned.

    • isAtEof

      public boolean isAtEof()
      Did the parser reach end of file on the input? The parser stops at either end-of-file or the first ShellInterpreter.NL that is not escaped or quoted.