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.CommandDescriptorImpl<T>
          extended by org.crsh.cli.impl.descriptor.HelpDescriptor<T>

public class HelpDescriptor<T>
extends CommandDescriptorImpl<T>

Author:
Julien Viet

Field Summary
private  CommandDescriptorImpl<T> delegate
          .
(package private) static OptionDescriptor HELP_OPTION
          .
private  HelpDescriptor<T> owner
          .
private  LinkedHashMap<String,HelpDescriptor<T>> subordinates
          .
 
Constructor Summary
  HelpDescriptor(CommandDescriptorImpl<T> delegate)
           
private HelpDescriptor(HelpDescriptor<T> owner, CommandDescriptorImpl<T> delegate)
           
 
Method Summary
static
<T> HelpDescriptor<T>
create(CommandDescriptorImpl<T> descriptor)
           
 CommandDescriptor<T> getDelegate()
           
 CommandInvoker<T> getInvoker(InvocationMatch<T> match)
           
 CommandDescriptor<T> getOwner()
           
 HelpDescriptor<T> getSubordinate(String name)
           
 Map<String,? extends HelpDescriptor<T>> getSubordinates()
          Returns the command subordinates as a map.
 Class<T> getType()
           
 
Methods inherited from class org.crsh.cli.impl.descriptor.CommandDescriptorImpl
completer, completer, invoker, invoker
 
Methods inherited from class org.crsh.cli.descriptor.CommandDescriptor
addParameter, 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
 

Field Detail

HELP_OPTION

static final OptionDescriptor HELP_OPTION
.


owner

private final HelpDescriptor<T> owner
.


delegate

private final CommandDescriptorImpl<T> delegate
.


subordinates

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

Constructor Detail

HelpDescriptor

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

HelpDescriptor

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

create

public static <T> HelpDescriptor<T> create(CommandDescriptorImpl<T> descriptor)

getDelegate

public CommandDescriptor<T> getDelegate()

getInvoker

public CommandInvoker<T> getInvoker(InvocationMatch<T> match)
Specified by:
getInvoker in class CommandDescriptorImpl<T>

getType

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

getOwner

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

getSubordinates

public Map<String,? extends HelpDescriptor<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 HelpDescriptor<T> getSubordinate(String name)
Specified by:
getSubordinate in class CommandDescriptorImpl<T>


Copyright © 2014 eXo Platform SAS. All Rights Reserved.