public class QEmuCommandLine extends Object
QEmuOption
, not a list
(see QEmuOptionsList
).
Disk and bus IDs within a QEmuOption may be allocated using the embedded
QEmuIdAllocator
in order to guarantee uniqueness.
For convenience, composites of commonly used options are provided as
QEmuRecipe
s.Constructor and Description |
---|
QEmuCommandLine(QEmuArchitecture architecture) |
QEmuCommandLine(QEmuCommandLine prototype) |
Modifier and Type | Method and Description |
---|---|
void |
addOptions(Iterable<? extends QEmuOption> options) |
void |
addOptions(QEmuOption... options) |
Process |
exec()
Executes this QEmuCommandLine and returns a new
Process . |
QEmuIdAllocator |
getAllocator() |
QEmuArchitecture |
getArchitecture() |
String |
getCommandName()
Returns the name (possibly with path) of the binary used to execute qemu.
|
<T extends QEmuOption> |
getOption(Class<T> type)
Returns the first option of the specified type in this command line.
|
List<? extends QEmuOption> |
getOptions()
Returns all the options in this command line.
|
<T extends QEmuOption> |
getOptions(Class<T> type)
Returns all options of the specified type in this command line.
|
void |
setArchitecture(QEmuArchitecture architecture) |
void |
setCommandName(String commandName) |
List<String> |
toCommandWords() |
String |
toString() |
public QEmuCommandLine(@Nonnull QEmuArchitecture architecture)
public QEmuCommandLine(@Nonnull QEmuCommandLine prototype)
@Nonnull public QEmuArchitecture getArchitecture()
public void setArchitecture(@Nonnull QEmuArchitecture architecture)
@Nonnull public QEmuIdAllocator getAllocator()
@Nonnull public List<? extends QEmuOption> getOptions()
@Nonnull public String getCommandName()
getArchitecture()
if not explicitly
set using setCommandName(java.lang.String)
.public void setCommandName(@Nonnull String commandName)
@Nonnull public <T extends QEmuOption> List<? extends T> getOptions(@Nonnull Class<T> type)
@CheckForNull public <T extends QEmuOption> T getOption(@Nonnull Class<T> type)
type
, null is returned.
If there is more than one option of type type
, the subsequent
options are ignored.public void addOptions(@Nonnull Iterable<? extends QEmuOption> options)
public void addOptions(@Nonnull QEmuOption... options)
@Nonnull public List<String> toCommandWords()
@Nonnull public Process exec() throws IOException
Process
.IOException