org.jboss.console.twiddle.command
Class AbstractCommand

java.lang.Object
  extended byorg.jboss.console.twiddle.command.AbstractCommand
All Implemented Interfaces:
java.lang.Cloneable, Command (src)
Direct Known Subclasses:
MBeanServerCommand (src)

public abstract class AbstractCommand
extends java.lang.Object
implements Command (src)

An abstract command.


Field Summary
protected  CommandContext (src) context
           
protected  java.lang.String desc
           
protected  Logger (src) log
           
protected  java.lang.String name
           
 
Constructor Summary
protected AbstractCommand(java.lang.String name, java.lang.String desc)
           
 
Method Summary
 java.lang.Object clone()
          Return a cloned copy of this command.
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 void setCommandContext(CommandContext (src)  context)
           
 void unsetCommandContext()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.console.twiddle.command.Command (src)
displayHelp, execute
 

Field Detail

log

protected Logger (src)  log

desc

protected final java.lang.String desc

name

protected final java.lang.String name

context

protected CommandContext (src)  context
Constructor Detail

AbstractCommand

protected AbstractCommand(java.lang.String name,
                          java.lang.String desc)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface Command (src)

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface Command (src)

setCommandContext

public void setCommandContext(CommandContext (src)  context)
Specified by:
setCommandContext in interface Command (src)

unsetCommandContext

public void unsetCommandContext()
Specified by:
unsetCommandContext in interface Command (src)

clone

public java.lang.Object clone()
Return a cloned copy of this command.

Specified by:
clone in interface Command (src)
Returns:
Cloned command.