|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A ParserCallback allows an application to interact with a Parser.
If a ParserCallback is specified in calling Parser.parse
, the
Parser will invoke ParserCallback methods as parsing is performed, allowing
limited well-defined interaction between the application and the Parser.
Method Summary | |
void |
postOperation(LibraryObject lo)
Invoked immediately after performing an operation on a LibraryObject. |
LibraryObjectDefinition |
preOperation(LibraryObject lo,
LibraryObjectDefinition def)
Invoked immediately prior to performing an operation on a LibraryObject. |
void |
signalException(IfsException e)
Signals a parsing-related exception. |
Method Detail |
public LibraryObjectDefinition preOperation(LibraryObject lo, LibraryObjectDefinition def) throws IfsException
lo
- the LibraryObject on which the operation will be
performed; null if the operation will create a new
LibraryObjectdef
- the operation proposed by the Parserdef
. To specify a different
operation, either return an altered def
or construct and return a different definition.
Return null to cancel the operation altogether.IfsException
- if the operation fails; this will abort parsingpublic void postOperation(LibraryObject lo) throws IfsException
lo
- the LibraryObjectIfsException
- if the operation fails; this will abort parsingpublic void signalException(IfsException e) throws IfsException
The ParserCallback implementation can either throw the exception, or simply return, in which case parsing continues.
e
- the potential exceptionIfsException
- this will abort parsing
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |