org.crsh.cli.impl.lang
Class ClassDescriptor<T>
java.lang.Object
org.crsh.cli.descriptor.CommandDescriptor<T>
org.crsh.cli.impl.descriptor.CommandDescriptorImpl<T>
org.crsh.cli.impl.lang.ClassDescriptor<T>
-
class ClassDescriptor<T>
- extends CommandDescriptorImpl<T>
-
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 |
type
private final Class<T> type
-
.
methods
private final Map<String,MethodDescriptor<T>> methods
-
.
ClassDescriptor
ClassDescriptor(Class<T> type,
Map<String,MethodDescriptor<T>> methods,
Description info)
throws IntrospectionException
-
- Throws:
IntrospectionException
addParameter
protected void addParameter(ParameterDescriptor parameter)
throws IntrospectionException
- Description copied from class:
CommandDescriptor
-
Add a parameter to the command.
-
- Overrides:
addParameter
in class CommandDescriptor<T>
-
- Parameters:
parameter
- the parameter to add
- Throws:
IntrospectionException
- any introspection exception that would prevent the parameter to be added
getInvoker
public CommandInvoker<T> getInvoker(InvocationMatch<T> match)
-
- Specified by:
getInvoker
in class CommandDescriptorImpl<T>
-
configure
void configure(InvocationMatch<T> classMatch,
T command)
throws InvocationException,
SyntaxException
-
- Throws:
InvocationException
SyntaxException
getOwner
public CommandDescriptor<T> getOwner()
-
- Specified by:
getOwner
in class CommandDescriptor<T>
-
getType
public Class<T> getType()
-
- Specified by:
getType
in class CommandDescriptor<T>
-
getSubordinates
public Map<String,? extends MethodDescriptor<T>> getSubordinates()
- Description copied from class:
CommandDescriptor
-
Returns the command subordinates as a map.
-
- Specified by:
getSubordinates
in class CommandDescriptorImpl<T>
-
- Returns:
- the subordinates
getSubordinate
public MethodDescriptor<T> getSubordinate(String name)
-
- Specified by:
getSubordinate
in class CommandDescriptorImpl<T>
-
Copyright © 2014 eXo Platform SAS. All Rights Reserved.