Class ParseOptionArgsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.refcodes.exception.AbstractException
org.refcodes.cli.CliException
org.refcodes.cli.CliException.CliArgsException
org.refcodes.cli.ArgsSyntaxException
org.refcodes.cli.ParseArgsException
org.refcodes.cli.ParseOptionArgsException
- All Implemented Interfaces:
Serializable,ArgsAccessor,LongOptionAccessor,MatchCountAccessor,ShortOptionAccessor,org.refcodes.exception.ErrorCodeAccessor,org.refcodes.exception.Trap,org.refcodes.mixin.SourceAccessor<Term>
public class ParseOptionArgsException
extends ParseArgsException
implements ShortOptionAccessor, LongOptionAccessor
Thrown in case the provided command line arguments do not respect the
required semantics or cannot be converted to the required type 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 org.refcodes.cli.CliException
CliException.CliArgsExceptionNested classes/interfaces inherited from interface org.refcodes.cli.ArgsAccessor
ArgsAccessor.ArgsMutator, ArgsAccessor.ArgsPropertyNested classes/interfaces inherited from interface org.refcodes.exception.ErrorCodeAccessor
org.refcodes.exception.ErrorCodeAccessor.ErrorCodeBuilder<B extends org.refcodes.exception.ErrorCodeAccessor.ErrorCodeBuilder<B>>, org.refcodes.exception.ErrorCodeAccessor.ErrorCodeMutator, org.refcodes.exception.ErrorCodeAccessor.ErrorCodePropertyNested classes/interfaces inherited from interface org.refcodes.cli.LongOptionAccessor
LongOptionAccessor.LongOptionBuilder<B extends LongOptionAccessor.LongOptionBuilder<B>>, LongOptionAccessor.LongOptionMutator, LongOptionAccessor.LongOptionPropertyNested classes/interfaces inherited from interface org.refcodes.cli.MatchCountAccessor
MatchCountAccessor.MatchCountBuilder<B extends MatchCountAccessor.MatchCountBuilder<B>>, MatchCountAccessor.MatchCountMutator, MatchCountAccessor.MatchCountPropertyNested classes/interfaces inherited from interface org.refcodes.cli.ShortOptionAccessor
ShortOptionAccessor.ShortOptionBuilder<B extends ShortOptionAccessor.ShortOptionBuilder<B>>, ShortOptionAccessor.ShortOptionMutator, ShortOptionAccessor.ShortOptionPropertyNested classes/interfaces inherited from interface org.refcodes.mixin.SourceAccessor
org.refcodes.mixin.SourceAccessor.SourceBuilder<SRC,B extends org.refcodes.mixin.SourceAccessor.SourceBuilder<SRC, B>>, org.refcodes.mixin.SourceAccessor.SourceMutator<SRC>, org.refcodes.mixin.SourceAccessor.SourceProperty<SRC> -
Field Summary
Fields inherited from class org.refcodes.cli.ArgsSyntaxException
_matchCount, _sourceFields inherited from class org.refcodes.cli.CliException.CliArgsException
_args -
Constructor Summary
ConstructorsConstructorDescriptionParseOptionArgsException(String[] aArgs, String aShortOption, String aLongOption, Throwable aCause) ParseOptionArgsException(String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, String aErrorCode) ParseOptionArgsException(String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, Term aSource) ParseOptionArgsException(String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, Term aSource, String aErrorCode) ParseOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption) ParseOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, String aErrorCode) ParseOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause) ParseOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, String aErrorCode) ParseOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, Term aSource) ParseOptionArgsException(String aMessage, String[] aArgs, String aShortOption, String aLongOption, Throwable aCause, Term aSource, String aErrorCode) -
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 org.refcodes.cli.ArgsSyntaxException
getMatchCount, getSource, toHeuristicMessage, toRootMatchCauseMethods inherited from class org.refcodes.cli.CliException.CliArgsException
getArgsMethods inherited from class org.refcodes.exception.AbstractException
getErrorCode, getMessageMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.refcodes.exception.Trap
toLocalizedMessage, toMessage, toMessage, toMessage, toShortLocalizedMessage, toShortMessage
-
Constructor Details
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
ParseOptionArgsException
public ParseOptionArgsException(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.
-
-
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 interfaceorg.refcodes.exception.Trap- Overrides:
getPatternArgumentsin classArgsSyntaxException
-