|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object avrora.util.Status
The Status
class is a utility that allows printing of the status (or progress) of a computation,
which might involve several steps. For example, executing a simulation might require loading several programs,
finding and initializing the device platform, creating a network topology, etc.
Field Summary | |
static boolean |
ENABLED
|
Constructor Summary | |
Status()
|
Method Summary | |
static void |
begin(java.lang.String s)
The begin() method prints a new line with the new status. |
static void |
error()
The error() method simply prints out "ERROR" in a stylized fashion was well as the time since
the last begin() call. |
static void |
error(Avrora.Error e)
The error() method simply prints out "ERROR" in a stylized fashion was well as the time since
the last begin() call, and then reports the exception. |
static void |
error(java.lang.String s)
The error() method simply prints out an error string in a stylized fashion was well as the time since
the last begin() call. |
static void |
error(java.lang.Throwable t)
The error() method simply prints out "ERROR" in a stylized fashion was well as the time since
the last begin() call, and then reports the exception. |
static void |
success()
The success() method simply prints out "OK" in a stylized fashion as well as the time since
the last begin() call. |
static void |
success(java.lang.String s)
The success() method simply prints out the success string in a stylized fashion as well as the
time since the last begin() call. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean ENABLED
Constructor Detail |
public Status()
Method Detail |
public static void begin(java.lang.String s)
begin()
method prints a new line with the new status. For example,
begin("Loading program");
prints the status line and an ellipsis "..."
,
as well as recording the time at which the method was called, which can be used to recover the time
spent in each stage. When the operation is completed, the success()
or error()
methods should be called.
s
- the current operation being performed, as a stringpublic static void success()
success()
method simply prints out "OK" in a stylized fashion as well as the time since
the last begin()
call.
public static void success(java.lang.String s)
success()
method simply prints out the success string in a stylized fashion as well as the
time since the last begin()
call.
s
- the success string to print out (instead of the default, "OK")public static void error()
error()
method simply prints out "ERROR" in a stylized fashion was well as the time since
the last begin()
call.
public static void error(java.lang.String s)
error()
method simply prints out an error string in a stylized fashion was well as the time since
the last begin()
call.
s
- the string to report as an error instead of "ERROR", which is the defaultpublic static void error(java.lang.Throwable t)
error()
method simply prints out "ERROR" in a stylized fashion was well as the time since
the last begin()
call, and then reports the exception.
t
- a throwable that was caught since the last begin()public static void error(Avrora.Error e)
error()
method simply prints out "ERROR" in a stylized fashion was well as the time since
the last begin()
call, and then reports the exception.
e
- an Avrora error that was caught since the last begin()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |