|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.cli.descriptor.CommandDescriptor<T> org.crsh.cli.impl.descriptor.CommandDescriptorImpl<T> org.crsh.cli.impl.lang.MethodDescriptor<T>
class MethodDescriptor<T>
Field Summary | |
---|---|
private Method |
method
. |
private ClassDescriptor<T> |
owner
. |
private int |
size
. |
Constructor Summary | |
---|---|
MethodDescriptor(ClassDescriptor<T> owner,
Method method,
String name,
Description info)
|
Method Summary | |
---|---|
protected void |
addParameter(ParameterDescriptor parameter)
Add a parameter to the command. |
CommandInvoker<T> |
getInvoker(InvocationMatch<T> _match)
|
Method |
getMethod()
|
CommandDescriptor<T> |
getOwner()
|
(package private) ParameterDescriptor |
getParameter(int index)
Returns the parameter descriptor for the specified method parameter index. |
CommandDescriptorImpl<T> |
getSubordinate(String name)
|
Map<String,? extends CommandDescriptorImpl<T>> |
getSubordinates()
Returns the command subordinates as a map. |
Class<T> |
getType()
|
Methods inherited from class org.crsh.cli.impl.descriptor.CommandDescriptorImpl |
---|
completer, completer, invoker, invoker |
Methods inherited from class org.crsh.cli.descriptor.CommandDescriptor |
---|
findOption, getArgument, getArguments, getDepth, getDescription, getLongOptionNames, getName, getOption, getOptionNames, getOptions, getParameters, getShortOptionNames, getUsage, printMan, printUsage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final ClassDescriptor<T> owner
private final Method method
private final int size
Constructor Detail |
---|
public MethodDescriptor(ClassDescriptor<T> owner, Method method, String name, Description info) throws IntrospectionException
IntrospectionException
Method Detail |
---|
ParameterDescriptor getParameter(int index) throws IndexOutOfBoundsException
index
- the parameter index
IndexOutOfBoundsException
- if the index is not validprotected void addParameter(ParameterDescriptor parameter) throws IntrospectionException, NullPointerException, IllegalArgumentException
CommandDescriptor
addParameter
in class CommandDescriptor<T>
parameter
- the parameter to add
IntrospectionException
- any introspection exception that would prevent the parameter to be added
NullPointerException
- if the parameter is null
IllegalArgumentException
- if the parameter is already associated with another commandpublic CommandDescriptor<T> getOwner()
getOwner
in class CommandDescriptor<T>
public Map<String,? extends CommandDescriptorImpl<T>> getSubordinates()
CommandDescriptor
getSubordinates
in class CommandDescriptorImpl<T>
public CommandDescriptorImpl<T> getSubordinate(String name)
getSubordinate
in class CommandDescriptorImpl<T>
public Method getMethod()
public Class<T> getType()
getType
in class CommandDescriptor<T>
public CommandInvoker<T> getInvoker(InvocationMatch<T> _match)
getInvoker
in class CommandDescriptorImpl<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |