public class MetadataCollection
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
listCommands()
Return a list of all names of plugin's contained in the MetdataCollection.
|
CommandMetadata |
lookup(java.lang.String command)
Lookup the meta data for a given
ShellCommand . |
void |
validate(ShellCommand parsed)
Validate the
ShellCommand against the meta data. |
public void validate(ShellCommand parsed) throws ValidationException, ShellParseException
ShellCommand
against the meta data. If this method completes successfully, then the command
is considered to be semantically correct as far at the meta data can tell. The plugin might still have custom
validation rules.parsed
- ShellCommand we want to validate.ValidationException
- If the command does not validate against the meta data. For instance, the command might not exist.ShellParseException
- If the command swallows a ShellCommand with syntax errors.public CommandMetadata lookup(java.lang.String command)
ShellCommand
.command
- The name of the command we are looking for. This is allowed to be a partial name.public java.util.List<java.lang.String> listCommands()