com.ibm.eNetwork.beans.HOD.event
Class MacroParseEvent
java.lang.Object
|
+--java.util.EventObject
|
+--com.ibm.eNetwork.beans.HOD.event.HODEvent
|
+--com.ibm.eNetwork.beans.HOD.event.MacroParseEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class MacroParseEvent
- extends com.ibm.eNetwork.beans.HOD.event.HODEvent
Event fired to objects implementing the MacroParseListener interface.
this event can be used to discover the details of any syntax errors
that the Macro bean finds in a macro string or stream.
To use this class properly, follow these steps:
- Implement the MacroParseListener and add it to Macro using Macro.addMacroParseListener.
- If the parseFailed method is called, you will know the syntax is incorrect.
- Call the parseStats() method to get an enumeration of all the problems with
the macro.
- Using the MacroParseStat object, you can get the line number, line text, and
error message of each error in the file.
- See Also:
- Serialized Form
Method Summary |
boolean |
isSuccess()
Returns if the parsing was successful. |
java.util.Enumeration |
parseStats()
Returns the parse statistics enumeration for the parse. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MacroParseEvent
public MacroParseEvent(Macro m)
- Constructs a parse event with Macro as its source.
- Parameters:
m
- Macro object that is source of parse event
isSuccess
public boolean isSuccess()
- Returns if the parsing was successful. Since the event is passed only
on the parseFailed method, this should always be false.
- Returns:
- success state of the parse
parseStats
public java.util.Enumeration parseStats()
- Returns the parse statistics enumeration for the parse. Any and all
errors are described in the enumeration.
- Returns:
- parsing statistic enumeration