|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.Extension
de.enough.polish.emulator.Emulator
public abstract class Emulator
Excutes an emulator.
Copyright Enough Software 2004 - 2011
history
04-Sep-2004 - rob creation
| Field Summary | |
|---|---|
protected Device |
device
|
protected EmulatorSetting |
emulatorSetting
|
protected boolean |
isFinished
|
| Fields inherited from class de.enough.polish.Extension |
|---|
antProject, autoStartCondition, environment, extensionDefinition, extensionManager, extensionSetting, extensionTypeDefinition, isBuildStarted |
| Constructor Summary | |
|---|---|
Emulator()
Creates a new emulator instance. |
|
| Method Summary | |
|---|---|
protected void |
addDebugArguments(ArrayList argsList,
Debugger debugger)
Adds the debugging settings to the arguments list. |
static Emulator |
createEmulator(Device device,
EmulatorSetting setting,
Environment environment,
File[] sourceDirs,
ExtensionManager extensionManager)
Creates the emulator for the given device. |
protected int |
exec(String[] arguments,
String info,
boolean wait,
OutputFilter filter,
File executionDir)
Executes the actual emulator. |
void |
execute(Device dev,
Locale locale,
Environment env)
Executes this extension. |
void |
filter(String logMessage,
PrintStream output)
Filters the given message. |
abstract String[] |
getArguments()
Retrieves the arguments which are used to start the emulator. |
protected File |
getExecutionDir()
Retrieves the directory in which the emulator should be executed. |
protected Variable |
getParameter(String name,
Variable[] parameters)
Gets a specific parameter |
protected Variable[] |
getParameters(EmulatorSetting setting,
Environment env)
Gets the parameters for this emulator. |
protected String |
getParameterValue(String name,
Variable[] parameters)
Gets a specific parameter-value |
abstract boolean |
init(Device dev,
EmulatorSetting setting,
Environment env)
Starts the emulator for the given device. |
boolean |
isFinished()
Determines whether this emulator is finished. |
void |
run()
|
protected void |
run(String[] arguments,
boolean retryOnError)
|
protected boolean |
supportsDebugger(Debugger debugger)
Defines whether this emulator supports the given debugger. |
protected Variable[] |
writeProperties(Variable[] variables,
Environment properties)
Writes all properties for the given parameters. |
| Methods inherited from class de.enough.polish.Extension |
|---|
configure, executeAntTarget, executeAntTarget, finalize, getAntProject, getAutoStartCondition, getEnvironment, getExtensionDefinition, getExtensionSetting, getInstance, getParameterValue, getType, init, initialize, isConditionFulfilled, notifyBuildEnd, notifyBuildStart |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected EmulatorSetting emulatorSetting
protected boolean isFinished
protected Device device
| Constructor Detail |
|---|
public Emulator()
init(Device, EmulatorSetting, Environment)| Method Detail |
|---|
public abstract boolean init(Device dev,
EmulatorSetting setting,
Environment env)
dev - the current devicesetting - the settingenv - all Ant- and polish-properties for the parameter-values
public abstract String[] getArguments()
public void run()
run in interface Runnable
protected void run(String[] arguments,
boolean retryOnError)
protected void addDebugArguments(ArrayList argsList,
Debugger debugger)
argsList - the arguments listdebugger - the debuggerprotected boolean supportsDebugger(Debugger debugger)
protected int exec(String[] arguments,
String info,
boolean wait,
OutputFilter filter,
File executionDir)
throws IOException
arguments - all command line argumentsinfo - the info block for output messageswait - true when the current thread should blockfilter - the output filterexecutionDir - the director for executing the emulator
IOException - when the emulator process could not be invokedprotected File getExecutionDir()
public boolean isFinished()
protected Variable[] writeProperties(Variable[] variables,
Environment properties)
variables - the input parametersproperties - the map containing all properties
protected Variable[] getParameters(EmulatorSetting setting,
Environment env)
setting - the emulator settingenv - all Ant- and J2ME Polish-properties.
protected Variable getParameter(String name,
Variable[] parameters)
name - the name of the parameterparameters - all parameters
protected String getParameterValue(String name,
Variable[] parameters)
name - the name of the parameterparameters - all parameters
public static Emulator createEmulator(Device device,
EmulatorSetting setting,
Environment environment,
File[] sourceDirs,
ExtensionManager extensionManager)
device - the current devicesetting - the configuration for the emulatorenvironment - the variables for the parameter-valuessourceDirs - the directories containing the original source files.extensionManager - manager for extensions
public void execute(Device dev,
Locale locale,
Environment env)
throws BuildException
Extension
execute in class Extensiondev - the current devicelocale - the current locale, can be nullenv - the environment/configuration
BuildException - when the execution failed
public void filter(String logMessage,
PrintStream output)
filter in interface OutputFilterlogMessage - the messageoutput - the stream to which the message should be written (if not filtered)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||