|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jfrace.Emulator
The Emulator
configurates a system and emulates it.
It is a singleton and can be used as an application or inside an
applet.
The configuration is done with the help of a configuration files.
They are similar to Java properties files. For more details
see SystemConfigurator
.
Method Summary | |
boolean |
analyseOption(java.lang.String option)
Analyse a command line option. |
void |
configure(java.lang.String configSource,
java.lang.String[] args)
Build and configurate the system in accordance with the configuration file. |
java.net.URL |
getAbsoluteURL(java.lang.String relativeOrAbsoluteURL)
Return the absolute URL built from relativeOrAbsoluteURL . |
AddressSpace |
getAddressSpace()
Return the address space. |
java.applet.Applet |
getApplet()
Return applet. |
static Emulator |
getEmulator()
Return the single instance of Emulator . |
boolean |
insideAnApplet()
Return true if the emulator runs inside an Applet. |
boolean |
isNoEmulation()
Return true if the no-emulation flag is set. |
boolean |
isWithGUI()
Return true if GUI flag is set. |
static void |
main(java.lang.String[] args)
Configure a system and run it. |
void |
runEmulation()
Run emulation. |
void |
setDocumentBase(java.net.URL anURL)
Set the document base for relative URL sources. |
void |
stopEmulation()
Stop emulation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Emulator getEmulator()
Emulator
.public static void main(java.lang.String[] args)
java ce.Emulator [<options>] <configSource> [<additional options>]where
<options>
<configSource>
<additional options>
List of the valid command line options:
-d
-dstart
-dstart.end
-dstart.end.step
start
-th
instruction has been executed and ends just before the
end
-th instruction.
Every step
-th step the CPUs will be
printed on the console. The default values of
start
, end
,
and step
are 0, infinity, and 1 resp.
-p
adaptationTime
of the configuration file.
-g
-n
-t
public java.applet.Applet getApplet()
public boolean insideAnApplet()
true
if the emulator runs inside an Applet.public boolean isNoEmulation()
true
if the no-emulation flag is set.
Is happens if a command line option was "-n".public boolean isWithGUI()
true
if GUI flag is set. Is happens
if a command line option was "-g".public AddressSpace getAddressSpace()
public void setDocumentBase(java.net.URL anURL)
public java.net.URL getAbsoluteURL(java.lang.String relativeOrAbsoluteURL)
relativeOrAbsoluteURL
. If
relativeOrAbsoluteURL
starts with "http://"
it is an absolute URL otherwise a relative one is assumed
and an URL will be returned which is built by the document base
(as it is set by the method setDocumentBase()
)
and relativeOrAbsoluteURL
.public boolean analyseOption(java.lang.String option)
option
- Command line option including '-'.true
if the option was a valid one.public void configure(java.lang.String configSource, java.lang.String[] args) throws ConfigurationException
configSource
- Source of the configuration file.args
- Additional arguments.ConfigurationException
- in the case of an error
(including syntax errors in the configuration file).public void runEmulation()
public void stopEmulation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |