public abstract class AbstractCommand extends Object implements Command
Modifier and Type | Field and Description |
---|---|
protected int |
exitCode |
protected VirtualProcess |
process |
STILL_ACTIVE
Constructor and Description |
---|
AbstractCommand(String name,
String subsystem) |
AbstractCommand(String name,
String subsystem,
String signature) |
AbstractCommand(String name,
String subsystem,
String signature,
org.apache.commons.cli.Option... options) |
Modifier and Type | Method and Description |
---|---|
int |
complete(String buffer,
int cursor,
List<String> candidates)
Populates candidates with a list of possible completions for the
buffer.
|
List<String> |
getCollection(int i) |
String |
getCommandName() |
String |
getDescription() |
int |
getExitCode() |
String |
getName() |
org.apache.commons.cli.Options |
getOptions() |
VirtualProcess |
getProcess() |
String |
getSignature() |
String |
getSubsystem() |
boolean |
hasFixedOptions() |
void |
init(VirtualProcess process) |
boolean |
isBuiltIn() |
boolean |
isHidden() |
protected void |
setBuiltIn(boolean builtIn) |
protected void |
setDescription(String description) |
protected void |
setName(String name) |
protected void |
setSignature(String signature) |
protected void |
setSubsystem(String subsystem) |
protected VirtualProcess process
protected int exitCode
public void init(VirtualProcess process)
public VirtualProcess getProcess()
public int complete(String buffer, int cursor, List<String> candidates)
Completor
List
before returning.public String getName()
public boolean hasFixedOptions()
public org.apache.commons.cli.Options getOptions()
getOptions
in interface Command
public String getDescription()
getDescription
in interface Command
public String getSubsystem()
getSubsystem
in interface Command
public String getCommandName()
getCommandName
in interface Command
public String getSignature()
getSignature
in interface Command
protected void setBuiltIn(boolean builtIn)
protected void setName(String name)
protected void setSubsystem(String subsystem)
protected void setSignature(String signature)
protected void setDescription(String description)
public int getExitCode()
getExitCode
in interface Command
Copyright © 2024. All rights reserved.