org.crsh.cli.impl.invocation
Class InvocationMatch<T>

java.lang.Object
  extended by org.crsh.cli.impl.invocation.InvocationMatch<T>

public final class InvocationMatch<T>
extends Object

Author:
Julien Viet

Field Summary
private  List<ArgumentMatch> arguments
          .
private  CommandDescriptorImpl<T> descriptor
          .
private  Map<OptionDescriptor,OptionMatch> options
          .
private  InvocationMatch<T> owner
          .
private  String rest
          .
 
Constructor Summary
  InvocationMatch(CommandDescriptorImpl<T> descriptor)
           
private InvocationMatch(InvocationMatch<T> owner, CommandDescriptorImpl<T> descriptor)
           
 
Method Summary
 void argument(ArgumentMatch argument)
           
 Collection<ArgumentMatch> arguments()
           
 CommandDescriptor<T> getDescriptor()
           
 CommandInvoker<T> getInvoker()
           
<D extends ParameterDescriptor>
ParameterMatch<D>
getParameter(D parameter)
           
 String getRest()
           
 Object invoke(Resolver resolver, T command)
           
 Object invoke(T command)
           
 void option(OptionMatch option)
           
 Collection<OptionMatch> options()
           
 InvocationMatch<T> owner()
           
 void setRest(String rest)
           
 InvocationMatch<T> subordinate(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

descriptor

private final CommandDescriptorImpl<T> descriptor
.


options

private Map<OptionDescriptor,OptionMatch> options
.


arguments

private List<ArgumentMatch> arguments
.


rest

private String rest
.


owner

private final InvocationMatch<T> owner
.

Constructor Detail

InvocationMatch

public InvocationMatch(CommandDescriptorImpl<T> descriptor)

InvocationMatch

private InvocationMatch(InvocationMatch<T> owner,
                        CommandDescriptorImpl<T> descriptor)
Method Detail

owner

public InvocationMatch<T> owner()

subordinate

public InvocationMatch<T> subordinate(String name)

getDescriptor

public CommandDescriptor<T> getDescriptor()

getParameter

public final <D extends ParameterDescriptor> ParameterMatch<D> getParameter(D parameter)

getInvoker

public CommandInvoker<T> getInvoker()

invoke

public Object invoke(T command)
              throws InvocationException,
                     SyntaxException
Throws:
InvocationException
SyntaxException

invoke

public Object invoke(Resolver resolver,
                     T command)
              throws InvocationException,
                     SyntaxException
Throws:
InvocationException
SyntaxException

options

public Collection<OptionMatch> options()

option

public void option(OptionMatch option)

arguments

public Collection<ArgumentMatch> arguments()

argument

public void argument(ArgumentMatch argument)

getRest

public String getRest()

setRest

public void setRest(String rest)


Copyright © 2014 eXo Platform SAS. All Rights Reserved.