Class UnknownOptionArgsException
- All Implemented Interfaces:
Serializable, ArgsAccessor, LongOptionAccessor, MatchCountAccessor, ShortOptionAccessor, ErrorCodeAccessor, Trap, 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:
-
Nested Class Summary
Nested classes/interfaces inherited from class CliException
CliException.CliArgsExceptionNested classes/interfaces inherited from interface ArgsAccessor
ArgsAccessor.ArgsMutator, ArgsAccessor.ArgsPropertyNested classes/interfaces inherited from interface ErrorCodeAccessor
ErrorCodeAccessor.ErrorCodeBuilder<B>, ErrorCodeAccessor.ErrorCodeMutator, ErrorCodeAccessor.ErrorCodePropertyNested classes/interfaces inherited from interface LongOptionAccessor
LongOptionAccessor.LongOptionBuilder<B>, LongOptionAccessor.LongOptionMutator, LongOptionAccessor.LongOptionPropertyNested classes/interfaces inherited from interface MatchCountAccessor
MatchCountAccessor.MatchCountBuilder<B>, MatchCountAccessor.MatchCountMutator, MatchCountAccessor.MatchCountPropertyNested classes/interfaces inherited from interface ShortOptionAccessor
ShortOptionAccessor.ShortOptionBuilder<B>, ShortOptionAccessor.ShortOptionMutator, ShortOptionAccessor.ShortOptionPropertyNested classes/interfaces inherited from interface SourceAccessor
SourceAccessor.SourceBuilder<SRC,B>, SourceAccessor.SourceMutator<SRC>, SourceAccessor.SourceProperty<SRC> -
Field Summary
Fields inherited from class ArgsSyntaxException
_matchCount, _sourceFields inherited from class CliException.CliArgsException
_args -
Constructor Summary
ConstructorsConstructorDescriptionUnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption) Instantiates the classUnknownOptionArgsException.UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, String aErrorCode) Instantiates the classUnknownOptionArgsException.UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause) Instantiates the classUnknownOptionArgsException.UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, String aErrorCode) Instantiates the classUnknownOptionArgsException.UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, Term aSource) Instantiates the classUnknownOptionArgsException.UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, Term aSource, String aErrorCode) Instantiates the classUnknownOptionArgsException.UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Term aSource) Instantiates the classUnknownOptionArgsException.UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Term aSource, String aErrorCode) Instantiates the classUnknownOptionArgsException.UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause) Instantiates the classUnknownOptionArgsException.UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause, String aErrorCode) Instantiates the classUnknownOptionArgsException.UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause, Term aSource) Instantiates the classUnknownOptionArgsException.UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause, Term aSource, String aErrorCode) Instantiates the classUnknownOptionArgsException. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the long option from the long option property.Object[]Retrieves the short option from the short option property.Methods inherited from class ArgsSyntaxException
getMatchCount, getSource, toHeuristicMessage, toRootMatchCauseMethods inherited from class CliException.CliArgsException
getArgsMethods inherited from class AbstractException
getErrorCode, getMessageMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Trap
toLocalizedMessage, toMessage, toMessage, toMessage, toShortLocalizedMessage, toShortMessage
-
Constructor Details
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Term aSource) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Term aSource, String aErrorCode) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, Term aSource) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, Term aSource, String aErrorCode) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause, Term aSource) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause, Term aSource, String aErrorCode) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, String aErrorCode) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, String aErrorCode) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
UnknownOptionArgsException
public UnknownOptionArgsException(String aShortOption, String aLongOption, String[] aArgs, Throwable aCause, String aErrorCode) Instantiates the classUnknownOptionArgsException.- 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.- See Also:
-
-
Method Details
-
getLongOption
Retrieves the long option from the long option property.- Specified by:
getLongOptionin interfaceLongOptionAccessor- Returns:
- The long option stored by the long option property.
-
getShortOption
Retrieves the short option from the short option property.- Specified by:
getShortOptionin interfaceShortOptionAccessor- Returns:
- The short option stored by the short option property.
-
getPatternArguments
- Specified by:
getPatternArgumentsin interfaceTrap- Overrides:
getPatternArgumentsin classArgsSyntaxException
-