org.sonatype.gshell.util.cli2.handler
Class Handler

java.lang.Object
  extended by org.sonatype.gshell.util.cli2.handler.Handler
Direct Known Subclasses:
BooleanHandler, DefaultHandler

public abstract class Handler
extends Object

Provides the basic mechanism to handle custom option and argument processing.

Since:
2.3
Author:
Jason Dillon

Nested Class Summary
static class Handler.Input
           
 
Constructor Summary
protected Handler(CliDescriptor descriptor)
           
 
Method Summary
abstract  String getDefaultToken()
           
 CliDescriptor getDescriptor()
           
 Setter getSetter()
           
abstract  void handle(String arg)
           
protected  void set(Object value)
           
protected  void set(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Handler

protected Handler(CliDescriptor descriptor)
Method Detail

getDescriptor

public CliDescriptor getDescriptor()

getSetter

public Setter getSetter()

set

protected void set(Object value)
            throws Exception
Throws:
Exception

set

protected void set(String value)
            throws Exception
Throws:
Exception

handle

public abstract void handle(String arg)
                     throws Exception
Throws:
Exception

getDefaultToken

public abstract String getDefaultToken()


Copyright © 2008-2011 Sonatype. All Rights Reserved.