class MethodDescriptor<T> extends ObjectCommandDescriptor<T>
Modifier and Type | Field and Description |
---|---|
private Method |
method
.
|
private ClassDescriptor<T> |
owner
.
|
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.
|
(package private) static void |
bind(InvocationMatch<?> match,
Iterable<ParameterDescriptor> parameters,
Object target,
Object[] args) |
CommandInvoker<Instance<T>,?> |
getInvoker(InvocationMatch<Instance<T>> match) |
private <V> ObjectCommandInvoker<T,V> |
getInvoker2(InvocationMatch<Instance<T>> match,
Class<V> returnType) |
Method |
getMethod() |
CommandDescriptor<Instance<T>> |
getOwner() |
Map<String,? extends CommandDescriptor<Instance<T>>> |
getSubordinates() |
completer, getArgument, getArguments, getDepth, getDescription, getLongOptionNames, getName, getOption, getOptionNames, getOptions, getParameters, getShortOptionNames, getSubordinate, getUsage, matcher, print, printMan, printUsage, resolveOption
private final ClassDescriptor<T> owner
public MethodDescriptor(ClassDescriptor<T> owner, Method method, String name, Description info) throws IntrospectionException
IntrospectionException
protected void addParameter(ParameterDescriptor parameter) throws IntrospectionException, NullPointerException, IllegalArgumentException
CommandDescriptor
addParameter
in class CommandDescriptor<Instance<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<Instance<T>> getOwner()
getOwner
in class CommandDescriptor<Instance<T>>
public Map<String,? extends CommandDescriptor<Instance<T>>> getSubordinates()
getSubordinates
in class CommandDescriptor<Instance<T>>
public CommandInvoker<Instance<T>,?> getInvoker(InvocationMatch<Instance<T>> match)
getInvoker
in class CommandDescriptor<Instance<T>>
static void bind(InvocationMatch<?> match, Iterable<ParameterDescriptor> parameters, Object target, Object[] args) throws SyntaxException, InvocationException
SyntaxException
InvocationException
private <V> ObjectCommandInvoker<T,V> getInvoker2(InvocationMatch<Instance<T>> match, Class<V> returnType)
Copyright © 2015 eXo Platform SAS. All Rights Reserved.