1 package org.lsst.ccs.command;
2
3 import java.io.Serializable;
4 import org.lsst.ccs.command.annotations.Command;
5
6 /**
7 * Encapsulate the dictionary information for a single command and parameters.
8 * This class is serializable for use in client-server applications, so does not
9 * maintain any references to Class or Method objects which may not be available
10 * in a remote client.
11 * @author tonyj
12 */
13 public interface DictionaryCommand extends Serializable {
14
15 final static String[] NO_ALIASES = new String[0];
16
17 String[] getAliases();
18
19 DictionaryArgument[] getArguments();
20
21 String getCommandName();
22
23 String getDescription();
24
25 Command.CommandType getType();
26
27 boolean isVarArgs();
28
29 int getLevel();
30
31 /**
32 * Test if value matches this command (either the command itself or one of
33 * its aliases).
34 *
35 * @param value The value to test
36 * @return <code>true</code> if the value matches
37 */
38 boolean matchesCommandOrAlias(String value);
39
40 }