public class ParameterConsumer extends Object
Parameters and parses arguments out of a
CommandContext.| Constructor and Description |
|---|
ParameterConsumer(List<? extends ParameterData<?>> parameters)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Object[] |
parseArguments(CommandContext context)
Parse arguments out of the given context.
|
Object[] |
parseArguments(CommandContext context,
boolean ignoreUnusedFlags,
Set<Character> unusedFlags)
Parse arguments out of the given context.
|
public ParameterConsumer(List<? extends ParameterData<?>> parameters)
parameters - the list of parameterspublic Object[] parseArguments(CommandContext context) throws CommandException, InvocationTargetException, ConsumeException, UnconsumedParameterException
context - the contextCommandException - thrown on an error raised by the commandInvocationTargetException - thrown if invocation failsConsumeException - thrown if the conumption of an argument failsUnconsumedParameterException - thrown if there are too many argumentspublic Object[] parseArguments(CommandContext context, boolean ignoreUnusedFlags, Set<Character> unusedFlags) throws CommandException, InvocationTargetException, ConsumeException, UnconsumedParameterException
context - the contextignoreUnusedFlags - true to not check if there are consumed flagsunusedFlags - list of flags to ignore if they are not consumedCommandException - thrown on an error raised by the commandInvocationTargetException - thrown if invocation failsConsumeException - thrown if the conumption of an argument failsUnconsumedParameterException - thrown if there are too many argumentsCopyright © 2015. All Rights Reserved.