org.crsh.cmdline.matcher
Class MethodMatch<T>

java.lang.Object
  extended by org.crsh.cmdline.matcher.CommandMatch<T,MethodDescriptor<T>,MethodArgumentBinding>
      extended by org.crsh.cmdline.matcher.MethodMatch<T>

public class MethodMatch<T>
extends CommandMatch<T,MethodDescriptor<T>,MethodArgumentBinding>

Version:
$Revision$
Author:
Julien Viet

Field Summary
private  MethodDescriptor<T> descriptor
          .
private  boolean implicit
          .
private  ClassMatch<T> owner
          .
 
Constructor Summary
MethodMatch(ClassMatch<T> owner, MethodDescriptor<T> descriptor, boolean implicit, List<OptionMatch<MethodArgumentBinding>> optionMatches, List<ArgumentMatch<MethodArgumentBinding>> argumentMatches, String rest)
           
 
Method Summary
protected  Object doInvoke(InvocationContext context, T command, Map<ParameterDescriptor<?>,Object> values)
           
 MethodDescriptor<T> getDescriptor()
           
 ClassMatch<T> getOwner()
           
 List<ParameterMatch<?,?>> getParameterMatches()
           
 Set<ParameterDescriptor<?>> getParameters()
           
 boolean isImplicit()
           
 void printMan(Appendable writer)
           
 void printUsage(Appendable writer)
           
 
Methods inherited from class org.crsh.cmdline.matcher.CommandMatch
getArgumentMatches, getOptionMatches, getRest, invoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

descriptor

private final MethodDescriptor<T> descriptor
.


owner

private final ClassMatch<T> owner
.


implicit

private final boolean implicit
.

Constructor Detail

MethodMatch

public MethodMatch(ClassMatch<T> owner,
                   MethodDescriptor<T> descriptor,
                   boolean implicit,
                   List<OptionMatch<MethodArgumentBinding>> optionMatches,
                   List<ArgumentMatch<MethodArgumentBinding>> argumentMatches,
                   String rest)
Method Detail

isImplicit

public boolean isImplicit()

getDescriptor

public MethodDescriptor<T> getDescriptor()
Specified by:
getDescriptor in class CommandMatch<T,MethodDescriptor<T>,MethodArgumentBinding>

getOwner

public ClassMatch<T> getOwner()

printMan

public void printMan(Appendable writer)
              throws IOException
Specified by:
printMan in class CommandMatch<T,MethodDescriptor<T>,MethodArgumentBinding>
Throws:
IOException

printUsage

public void printUsage(Appendable writer)
                throws IOException
Specified by:
printUsage in class CommandMatch<T,MethodDescriptor<T>,MethodArgumentBinding>
Throws:
IOException

getParameters

public Set<ParameterDescriptor<?>> getParameters()
Specified by:
getParameters in class CommandMatch<T,MethodDescriptor<T>,MethodArgumentBinding>

getParameterMatches

public List<ParameterMatch<?,?>> getParameterMatches()
Specified by:
getParameterMatches in class CommandMatch<T,MethodDescriptor<T>,MethodArgumentBinding>

doInvoke

protected Object doInvoke(InvocationContext context,
                          T command,
                          Map<ParameterDescriptor<?>,Object> values)
                   throws CmdInvocationException,
                          CmdSyntaxException
Specified by:
doInvoke in class CommandMatch<T,MethodDescriptor<T>,MethodArgumentBinding>
Throws:
CmdInvocationException
CmdSyntaxException


Copyright © 2012 eXo Platform SAS. All Rights Reserved.