|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.cmdline.CommandDescriptor<T,ClassFieldBinding>
org.crsh.cmdline.ClassDescriptor<T>
public class ClassDescriptor<T>
| Field Summary | |
|---|---|
private static org.slf4j.Logger |
log
. |
private Map<String,MethodDescriptor<T>> |
methods
. |
private Class<T> |
type
. |
| Constructor Summary | |
|---|---|
ClassDescriptor(Class<T> type,
Map<String,MethodDescriptor<T>> methods,
Description info)
|
|
| Method Summary | |
|---|---|
(package private) void |
addParameter(ParameterDescriptor<ClassFieldBinding> parameter)
Add a parameter to the command. |
OptionDescriptor<?> |
findOption(String name)
Find an command option by its name. |
MethodDescriptor<T> |
getMethod(String name)
|
Iterable<MethodDescriptor<T>> |
getMethods()
|
Map<String,? extends CommandDescriptor<T,?>> |
getSubordinates()
Returns the command subordinates as a map. |
Class<T> |
getType()
|
Matcher<T> |
matcher()
|
Matcher<T> |
matcher(String mainName)
|
void |
printMan(Appendable writer)
|
void |
printUsage(Appendable writer)
|
| Methods inherited from class org.crsh.cmdline.CommandDescriptor |
|---|
getArgument, getArguments, getDescription, getLongOptionNames, getName, getOption, getOptionNames, getOptions, getParameters, getShortOptionNames, getUsage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final org.slf4j.Logger log
private final Class<T> type
private final Map<String,MethodDescriptor<T>> methods
| Constructor Detail |
|---|
ClassDescriptor(Class<T> type,
Map<String,MethodDescriptor<T>> methods,
Description info)
throws IntrospectionException
IntrospectionException| Method Detail |
|---|
public Matcher<T> matcher()
public Matcher<T> matcher(String mainName)
void addParameter(ParameterDescriptor<ClassFieldBinding> parameter)
throws IntrospectionException
CommandDescriptor
addParameter in class CommandDescriptor<T,ClassFieldBinding>parameter - the parameter to add
IntrospectionException - any introspection exception that would prevent the parameter to be addedpublic Class<T> getType()
getType in class CommandDescriptor<T,ClassFieldBinding>public Map<String,? extends CommandDescriptor<T,?>> getSubordinates()
CommandDescriptor
getSubordinates in class CommandDescriptor<T,ClassFieldBinding>public OptionDescriptor<?> findOption(String name)
CommandDescriptor
findOption in class CommandDescriptor<T,ClassFieldBinding>name - the option name
public void printUsage(Appendable writer)
throws IOException
printUsage in class CommandDescriptor<T,ClassFieldBinding>IOException
public void printMan(Appendable writer)
throws IOException
printMan in class CommandDescriptor<T,ClassFieldBinding>IOExceptionpublic Iterable<MethodDescriptor<T>> getMethods()
public MethodDescriptor<T> getMethod(String name)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||