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

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

public class InvocationMatcher<T>
extends Object

Author:
Julien Viet

Field Summary
private  CommandDescriptor<T> descriptor
          .
private  Iterable<Token> tokens
          .
 
Constructor Summary
  InvocationMatcher(CommandDescriptor<T> descriptor)
           
private InvocationMatcher(CommandDescriptor<T> descriptor, Iterable<Token> tokens)
           
 
Method Summary
 InvocationMatch<T> arguments(List<?> arguments)
           
private  List<LiteralValue> bilto(List<? extends Token.Literal> literals)
           
private  InvocationMatch<T> match(Iterable<Token> tokens)
           
private  InvocationMatch<T> match(Tokenizer tokenizer)
           
 InvocationMatcher<T> option(String optionName, List<?> optionValue)
           
 InvocationMatcher<T> options(Map<String,List<?>> options)
           
 InvocationMatch<T> parse(String s)
           
 InvocationMatcher<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 CommandDescriptor<T> descriptor
.


tokens

private Iterable<Token> tokens
.

Constructor Detail

InvocationMatcher

public InvocationMatcher(CommandDescriptor<T> descriptor)

InvocationMatcher

private InvocationMatcher(CommandDescriptor<T> descriptor,
                          Iterable<Token> tokens)
Method Detail

subordinate

public InvocationMatcher<T> subordinate(String name)
                                 throws SyntaxException
Throws:
SyntaxException

option

public InvocationMatcher<T> option(String optionName,
                                   List<?> optionValue)
                            throws SyntaxException
Throws:
SyntaxException

options

public InvocationMatcher<T> options(Map<String,List<?>> options)
                             throws SyntaxException
Throws:
SyntaxException

arguments

public InvocationMatch<T> arguments(List<?> arguments)
                             throws SyntaxException
Throws:
SyntaxException

parse

public InvocationMatch<T> parse(String s)
                         throws SyntaxException
Throws:
SyntaxException

match

private InvocationMatch<T> match(Iterable<Token> tokens)
                          throws SyntaxException
Throws:
SyntaxException

match

private InvocationMatch<T> match(Tokenizer tokenizer)
                          throws SyntaxException
Throws:
SyntaxException

bilto

private List<LiteralValue> bilto(List<? extends Token.Literal> literals)


Copyright © 2015 eXo Platform SAS. All Rights Reserved.