|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.cmdline.CommandDescriptor<T,MethodArgumentBinding>
org.crsh.cmdline.MethodDescriptor<T>
public class MethodDescriptor<T>
| Field Summary | |
|---|---|
private static org.slf4j.Logger |
log
. |
private static Set<String> |
MAIN_SINGLETON
. |
private Method |
method
. |
private ClassDescriptor<T> |
owner
. |
private int |
size
. |
| Constructor Summary | |
|---|---|
MethodDescriptor(ClassDescriptor<T> owner,
Method method,
String name,
Description info)
|
|
| Method Summary | |
|---|---|
OptionDescriptor<?> |
findOption(String name)
Find an command option by its name. |
Method |
getMethod()
|
ParameterDescriptor<MethodArgumentBinding> |
getParameter(int index)
Returns the parameter descriptor for the specified method parameter index. |
Map<String,? extends CommandDescriptor<T,?>> |
getSubordinates()
Returns the command subordinates as a map. |
Class<T> |
getType()
|
void |
printMan(Appendable writer)
|
void |
printUsage(Appendable writer)
|
| Methods inherited from class org.crsh.cmdline.CommandDescriptor |
|---|
addParameter, 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 Set<String> MAIN_SINGLETON
private static final org.slf4j.Logger log
private final ClassDescriptor<T> owner
private final Method method
private final int size
| Constructor Detail |
|---|
MethodDescriptor(ClassDescriptor<T> owner,
Method method,
String name,
Description info)
throws IntrospectionException
IntrospectionException| Method Detail |
|---|
public ParameterDescriptor<MethodArgumentBinding> getParameter(int index)
throws IndexOutOfBoundsException
index - the parameter index
IndexOutOfBoundsException - if the index is not validpublic Map<String,? extends CommandDescriptor<T,?>> getSubordinates()
CommandDescriptor
getSubordinates in class CommandDescriptor<T,MethodArgumentBinding>public Method getMethod()
public Class<T> getType()
getType in class CommandDescriptor<T,MethodArgumentBinding>public OptionDescriptor<?> findOption(String name)
CommandDescriptor
findOption in class CommandDescriptor<T,MethodArgumentBinding>name - the option name
public void printUsage(Appendable writer)
throws IOException
printUsage in class CommandDescriptor<T,MethodArgumentBinding>IOException
public void printMan(Appendable writer)
throws IOException
printMan in class CommandDescriptor<T,MethodArgumentBinding>IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||