class MethodDescriptor<T> extends CommandDescriptorImpl<T>
| Modifier and Type | Field and Description |
|---|---|
private Method |
method
.
|
private ClassDescriptor<T> |
owner
.
|
private int |
size
.
|
| Constructor and Description |
|---|
MethodDescriptor(ClassDescriptor<T> owner,
Method method,
String name,
Description info) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addParameter(ParameterDescriptor parameter)
Add a parameter to the command.
|
CommandInvoker<T,?> |
getInvoker(InvocationMatch<T> match) |
private <V> CommandInvoker<T,V> |
getInvoker2(InvocationMatch<T> _match,
Class<V> returnType) |
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() |
completer, completer, invoker, invokerfindOption, getArgument, getArguments, getDepth, getDescription, getLongOptionNames, getName, getOption, getOptionNames, getOptions, getParameters, getShortOptionNames, getUsage, printMan, printUsageprivate final ClassDescriptor<T> owner
private final int size
public MethodDescriptor(ClassDescriptor<T> owner, Method method, String name, Description info) throws IntrospectionException
IntrospectionExceptionParameterDescriptor getParameter(int index) throws IndexOutOfBoundsException
index - the parameter indexIndexOutOfBoundsException - if the index is not validprotected void addParameter(ParameterDescriptor parameter) throws IntrospectionException, NullPointerException, IllegalArgumentException
CommandDescriptoraddParameter in class CommandDescriptor<T>parameter - the parameter to addIntrospectionException - any introspection exception that would prevent the parameter to be addedNullPointerException - if the parameter is nullIllegalArgumentException - if the parameter is already associated with another commandpublic CommandDescriptor<T> getOwner()
getOwner in class CommandDescriptor<T>public Map<String,? extends CommandDescriptorImpl<T>> getSubordinates()
CommandDescriptorgetSubordinates in class CommandDescriptorImpl<T>public CommandDescriptorImpl<T> getSubordinate(String name)
getSubordinate in class CommandDescriptorImpl<T>public CommandInvoker<T,?> getInvoker(InvocationMatch<T> match)
getInvoker in class CommandDescriptorImpl<T>private <V> CommandInvoker<T,V> getInvoker2(InvocationMatch<T> _match, Class<V> returnType)
Copyright © 2013 eXo Platform SAS. All Rights Reserved.