Package net.apartium.cocoabeans.commands
Interface ArgumentMapper
- All Known Implementing Classes:
SimpleArgumentMapper
public interface ArgumentMapper
Maps the command arguments into the parameters required by the sub command
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionList<ArgumentIndex<?>> mapIndices(RegisteredVariant.Parameter[] parameters, List<RegisterArgumentParser<?>> argumentParsers, List<Requirement> requirements, List<Class<?>> additionalTypes) Maps the command arguments into the argument indexes required by the sub command to be call with the right arguments
-
Method Details
-
mapIndices
List<ArgumentIndex<?>> mapIndices(RegisteredVariant.Parameter[] parameters, List<RegisterArgumentParser<?>> argumentParsers, List<Requirement> requirements, List<Class<?>> additionalTypes) Maps the command arguments into the argument indexes required by the sub command to be call with the right arguments- Parameters:
parameters- parametersargumentParsers- argumentParsers (should be in order)requirements- requirementsadditionalTypes- additional types are use for providing additional arguments to the command they are inserted at the end- Returns:
- list of argument indexes
-