Class Model.SeemsToWorkForLinuxAndSomeWindowsVersions20220613

java.lang.Object
eu.bandm.tools.option.runtime.Model.SeemsToWorkForLinuxAndSomeWindowsVersions20220613
All Implemented Interfaces:
Model.ShellAdapter
Enclosing class:
Model<M extends Model>

public static class Model.SeemsToWorkForLinuxAndSomeWindowsVersions20220613 extends Object implements Model.ShellAdapter
An adapter which encloses empty string values or string values containing double double quotes or blanks in double quotes, The contained double quotes are escaped by backslashes.
  • Field Details

    • p_arg

      protected final Pattern p_arg
      Pattern to match a serialized argument.
    • lastStart

      protected int lastStart
  • Constructor Details

    • SeemsToWorkForLinuxAndSomeWindowsVersions20220613

      public SeemsToWorkForLinuxAndSomeWindowsVersions20220613()
  • Method Details

    • serializeToArgsString

      public String serializeToArgsString(String s)
      Description copied from interface: Model.ShellAdapter
      If the argument value contains whitespace or double quotes, it must be escaped when integrated into a serialization. It is only assumed that this function is only called (and only necessary) for argument values of String type.
      Specified by:
      serializeToArgsString in interface Model.ShellAdapter
    • startOfLastMatch

      public int startOfLastMatch()
      Description copied from interface: Model.ShellAdapter
      Delivers the start of the last successful match. May only be called immediately after a call to Model.ShellAdapter.testNextToken(Matcher,int) with result != null.
      Specified by:
      startOfLastMatch in interface Model.ShellAdapter
    • testNextToken

      @Opt public @Opt String testNextToken(Matcher mat, int len)
      Description copied from interface: Model.ShellAdapter
      Parse and return the next argument value. The serialized input, the Model.matcher is looking at, will be translated into the internal form (ie. blanks will be unescaped, empty strings stripped from quotation marks, etc.) Internal matcher registers will be advanced (thus no more reflecting this match!) and the translated character data is copied inot Model.nextToken. The realization by the sub-classes must use a regex-Pattern which accepts ALL non-whitespace input and returns null only when the end of the input stream (discarding whitespace) is reached.
      Specified by:
      testNextToken in interface Model.ShellAdapter
      Parameters:
      mat - is prepared and looking at the current parsing position of the input string.