Class UnknownOptionArgsException

All Implemented Interfaces:
Serializable, ArgsAccessor, LongOptionAccessor, MatchCountAccessor, ShortOptionAccessor, org.refcodes.exception.ErrorCodeAccessor, org.refcodes.exception.Trap, org.refcodes.mixin.SourceAccessor<Term>

public class UnknownOptionArgsException extends UnknownArgsException implements ShortOptionAccessor, LongOptionAccessor
Thrown in case command line arguments were not processed (did not match the expected arguments) by an Option (having a short- and/or a long-option), e.g. the arguments were rejected as them did not work for the according syntax.
See Also:
  • Constructor Details

    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Term aSource)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Term aSource, String aErrorCode)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, Term aSource)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, Term aSource, String aErrorCode)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause, Term aSource)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause, Term aSource, String aErrorCode)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, String aErrorCode)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, String aErrorCode)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
    • UnknownOptionArgsException

      public UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause, String aErrorCode)
      Parameters:
      aShortOption - The full short option (prefix + suffix) for which the arguments did not apply.
      aLongOption - The full long option (prefix + suffix) for which the arguments did not apply.
  • Method Details

    • getLongOption

      public String getLongOption()
      Retrieves the long option from the long option property.
      Specified by:
      getLongOption in interface LongOptionAccessor
      Returns:
      The long option stored by the long option property.
    • getShortOption

      public String getShortOption()
      Retrieves the short option from the short option property.
      Specified by:
      getShortOption in interface ShortOptionAccessor
      Returns:
      The short option stored by the short option property.
    • getPatternArguments

      public Object[] getPatternArguments()
      Specified by:
      getPatternArguments in interface org.refcodes.exception.Trap
      Overrides:
      getPatternArguments in class ArgsSyntaxException