|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lsmp.djep.xjep.DoNothingVisitor
org.lsmp.djep.xjep.ErrorCatchingVisitor
An abstract ParserVisitor which adds some useful error handeling facilities. Visitors which require these facilities should extend this class. General format should be
clearErrors(); Object res = (Node) node.jjtAccept(this,data); if(hasErrors()) throw new ParseException(getErrors());
Constructor Summary | |
ErrorCatchingVisitor()
|
Method Summary | |
java.lang.Object |
acceptCatchingErrors(Node node,
java.lang.Object data)
calls jjtAccept inside a try catch block, adding the error if necessary |
void |
addError(java.lang.Exception e)
Adds an error message to the list of errors. |
void |
clearErrors()
Reset the list of errors. |
java.lang.Exception |
getError()
Returns the Exception or null if no error. |
java.lang.String |
getErrorsMessage()
Returns the error messages. |
boolean |
hasErrors()
Are their any errors? |
Methods inherited from class org.lsmp.djep.xjep.DoNothingVisitor |
acceptChildrenAsArray, visit, visit, visit, visit, visit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ErrorCatchingVisitor()
Method Detail |
public java.lang.Object acceptCatchingErrors(Node node, java.lang.Object data)
public void clearErrors()
public boolean hasErrors()
public void addError(java.lang.Exception e)
public java.lang.String getErrorsMessage()
public java.lang.Exception getError()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |