Module org.refcodes.cli
Package org.refcodes.cli
Interface ArgsParserMixin<B extends ArgsParserMixin<B>>
- All Known Subinterfaces:
ArgsParser
- All Known Implementing Classes:
ArgsParserImpl
public interface ArgsParserMixin<B extends ArgsParserMixin<B>>
This mixin provides builder additions (as of the builder pattern for chained
configuring method calls) for parsing command line arguments.
-
Method Summary
Modifier and Type Method Description BwithEvalArgs(String[] aArgs)Evaluates the provided command line arguments.default BwithEvalArgs(List<String> aArgs)Evaluates the provided command line arguments .
-
Method Details
-
withEvalArgs
B withEvalArgs(String[] aArgs) throws UnknownArgsException, AmbiguousArgsException, SuperfluousArgsException, ParseArgsExceptionEvaluates the provided command line arguments.- Parameters:
aArgs- The command line arguments to be evaluated.- Returns:
- This instance as of the builder pattern to chain further method calls.
- Throws:
UnknownArgsException- Thrown in case not one command line argument matched regarding the provided args vs. the expected args.AmbiguousArgsException- Thrown in case at least one command line argument is ambiguous regarding expected args vs. provided args.SuperfluousArgsException- Thrown in case there were arguments found not being used (superfluous arguments).ParseArgsException- Thrown in case the provided command line arguments do not respect the required syntax or cannot be converted to the required type
-
withEvalArgs
default B withEvalArgs(List<String> aArgs) throws UnknownArgsException, AmbiguousArgsException, SuperfluousArgsException, ParseArgsExceptionEvaluates the provided command line arguments .- Parameters:
aArgs- The command line arguments to be evaluated.- Returns:
- This instance as of the builder pattern to chain further method calls.
- Throws:
UnknownArgsException- Thrown in case not one command line argument matched regarding the provided args vs. the expected args.AmbiguousArgsException- Thrown in case at least one command line argument is ambiguous regarding expected args vs. provided args.SuperfluousArgsException- Thrown in case there were arguments found not being used (superfluous arguments).ParseArgsException- Thrown in case the provided command line arguments do not respect the required syntax or cannot be converted to the required type
-