org.crsh.cli.impl.descriptor
Class HelpDescriptor<T>

java.lang.Object
  extended by org.crsh.cli.descriptor.CommandDescriptor<T>
      extended by org.crsh.cli.impl.descriptor.HelpDescriptor<T>

public class HelpDescriptor<T>
extends CommandDescriptor<T>

Author:
Julien Viet

Field Summary
private  CommandDescriptor<T> delegate
          .
(package private) static OptionDescriptor HELP_OPTION
          .
private  HelpDescriptor<T> owner
          .
private  LinkedHashMap<String,HelpDescriptor<T>> subordinates
          .
 
Constructor Summary
  HelpDescriptor(CommandDescriptor<T> delegate)
           
private HelpDescriptor(HelpDescriptor<T> owner, CommandDescriptor<T> delegate)
           
 
Method Summary
static
<T> HelpDescriptor<T>
create(CommandDescriptor<T> descriptor)
           
 CommandDescriptor<T> getDelegate()
           
 CommandInvoker<T,?> getInvoker(InvocationMatch<T> match)
           
 CommandDescriptor<T> getOwner()
           
 Map<String,? extends HelpDescriptor<T>> getSubordinates()
           
 
Methods inherited from class org.crsh.cli.descriptor.CommandDescriptor
addParameter, 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

HELP_OPTION

static final OptionDescriptor HELP_OPTION
.


owner

private final HelpDescriptor<T> owner
.


delegate

private final CommandDescriptor<T> delegate
.


subordinates

private final LinkedHashMap<String,HelpDescriptor<T>> subordinates
.

Constructor Detail

HelpDescriptor

public HelpDescriptor(CommandDescriptor<T> delegate)
               throws IntrospectionException
Throws:
IntrospectionException

HelpDescriptor

private HelpDescriptor(HelpDescriptor<T> owner,
                       CommandDescriptor<T> delegate)
                throws IntrospectionException
Throws:
IntrospectionException
Method Detail

create

public static <T> HelpDescriptor<T> create(CommandDescriptor<T> descriptor)
                                throws IntrospectionException
Throws:
IntrospectionException

getDelegate

public CommandDescriptor<T> getDelegate()

getInvoker

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

getOwner

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

getSubordinates

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


Copyright © 2015 eXo Platform SAS. All Rights Reserved.