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, Map<Class<?>, List<ArgumentIndex<?>>> providedArgumentIndexesByType) 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, Map<Class<?>, List<ArgumentIndex<?>>> providedArgumentIndexesByType) 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- requirementsprovidedArgumentIndexesByType- provided argument indexes by type- Returns:
- list of argument indexes
-