org.crsh.cli.impl.lang
Class ClassDescriptor<T>

java.lang.Object
  extended by org.crsh.cli.descriptor.CommandDescriptor<Instance<T>>
      extended by org.crsh.cli.impl.lang.ObjectCommandDescriptor<T>
          extended by org.crsh.cli.impl.lang.ClassDescriptor<T>

 class ClassDescriptor<T>
extends ObjectCommandDescriptor<T>


Field Summary
private  Map<String,MethodDescriptor<T>> methods
          .
private  Class<T> type
          .
 
Constructor Summary
ClassDescriptor(Class<T> type, String name, Map<String,MethodDescriptor<T>> methods, Description info)
           
 
Method Summary
protected  void addParameter(ParameterDescriptor parameter)
          Add a parameter to the command.
 ObjectCommandInvoker<T,?> getInvoker(InvocationMatch<Instance<T>> match)
           
 CommandDescriptor<Instance<T>> getOwner()
           
 Map<String,? extends MethodDescriptor<T>> getSubordinates()
           
 
Methods inherited from class org.crsh.cli.descriptor.CommandDescriptor
completer, getArgument, getArguments, getDepth, getDescription, getLongOptionNames, getName, getOption, getOptionNames, getOptions, getParameters, getShortOptionNames, getSubordinate, getUsage, matcher, print, printMan, printUsage, resolveOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

private final Class<T> type
.


methods

private final Map<String,MethodDescriptor<T>> methods
.

Constructor Detail

ClassDescriptor

ClassDescriptor(Class<T> type,
                String name,
                Map<String,MethodDescriptor<T>> methods,
                Description info)
          throws IntrospectionException
Throws:
IntrospectionException
Method Detail

addParameter

protected void addParameter(ParameterDescriptor parameter)
                     throws IntrospectionException
Description copied from class: CommandDescriptor
Add a parameter to the command.

Overrides:
addParameter in class CommandDescriptor<Instance<T>>
Parameters:
parameter - the parameter to add
Throws:
IntrospectionException - any introspection exception that would prevent the parameter to be added

getInvoker

public ObjectCommandInvoker<T,?> getInvoker(InvocationMatch<Instance<T>> match)
Specified by:
getInvoker in class CommandDescriptor<Instance<T>>

getOwner

public CommandDescriptor<Instance<T>> getOwner()
Specified by:
getOwner in class CommandDescriptor<Instance<T>>

getSubordinates

public Map<String,? extends MethodDescriptor<T>> getSubordinates()
Specified by:
getSubordinates in class CommandDescriptor<Instance<T>>
Returns:
the command subordinates as a map.


Copyright © 2015 eXo Platform SAS. All Rights Reserved.