Clad User Manual: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:
The framework scans the command line looking for the first argument that can be mapped to a command.  
The framework scans the command line looking for the first argument that can be mapped to a command.  


The mapping process involves scanning the classpath and looking for classes implementing the [https://github.com/NovaOrdis/clad/blob/master/src/main/java/io/novaordis/clad/command/Command.java Command interface] implementations whose simple class name match the following pattern: <commandName>Command.  
The mapping process involves scanning the classpath and looking for classes implementing the [https://github.com/NovaOrdis/clad/blob/master/src/main/java/io/novaordis/clad/command/Command.java Command interface]. The current version does not introspect all classes, but just those whose simple class name match the following pattern: <tt><commandName>Command</tt>.  


Everything between the wrapper name and the command name is interpreted as global option.
All arguments between the wrapper name and the command name are interpreted as global options.


Everything beyond the command name is interpreted as command’s option.
All arguments following the command name are interpreted as command options.

Revision as of 04:10, 2 March 2016

Internal


Overview

The framework scans the command line looking for the first argument that can be mapped to a command.

The mapping process involves scanning the classpath and looking for classes implementing the Command interface. The current version does not introspect all classes, but just those whose simple class name match the following pattern: <commandName>Command.

All arguments between the wrapper name and the command name are interpreted as global options.

All arguments following the command name are interpreted as command options.