|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectuk.ac.ucl.che.esf.base.Warning
public class Warning
During a synthesis (or in fact simulation or optimization) run, certain events will occur that cannot be handled intelligently by the search procedure. in these cases, the object responsible for noting the event will typically throw an exception which will be caught upwards in the hierarchy. However, the action performed due to the exception may often be to simply ignore the situation (for instance, a DesignError exception in a unit model due to a situation which the model was not intended to handle). This class is used to keep a record of warnings, generated in response to these events.
The intention is that a list of warnings will be displayed at the end of a run, allowing the user to decide whether the results generated are actually reasonable or suitable.
| Constructor Summary | |
|---|---|
Warning(java.lang.String msg)
The constructor simply expects a message which will be output to the user at the end of a run. |
|
| Method Summary | |
|---|---|
java.lang.String |
getMessage()
Retrieve the message associated with the warning. |
void |
invoke()
Indicate that a warning has been generated. |
static void |
print(java.io.PrintWriter pw)
Output the list of warning messages, including a count of the number of times each warning was invoked. |
static void |
reset()
Reset the hash set to start with no previously generated warnings. |
java.lang.String |
toString()
Output a terse description of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Warning(java.lang.String msg)
msg - The actual warning message.| Method Detail |
|---|
public final java.lang.String getMessage()
public void invoke()
public static void print(java.io.PrintWriter pw)
public static final void reset()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||