|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.inxar.syntacs.translator.StandardAuditor
Standard implementation of Auditor
.
Inner Class Summary | |
class |
StandardAuditor.StandardComplaint
|
Constructor Summary | |
StandardAuditor()
|
Method Summary | |
int |
complaints()
Returns the current number of complaints ( errors() +
warnings() ). |
int |
errors()
Returns the current number of errors. |
List |
getErrors()
Returns an unmodifiable list of errors, where each member in the List is an Complaint . |
Properties |
getProperties()
Gets the Properties instance. |
String |
getSource()
Gets the name of the input source. |
List |
getWarnings()
Returns an unmodifiable list of warnings, where each member in the List is an Complaint . |
boolean |
hasErrors()
Returns true if there is at least one error,
false otherwise. |
boolean |
hasWarnings()
Returns true if there is at least one warning,
false otherwise. |
boolean |
isEmpty()
Returns true if there are no errors or warnings,
false if there is at least one error or at least
one warning. |
Complaint |
notify(Complaint d)
Adds the given Complaint to the end of the the
internal List of complaints and returns the same
object to the caller. |
Complaint |
notify(int type,
int line,
String msg)
Creates a new Complaint of the given type having
the given message and given line number. |
Complaint |
notify(int type,
String msg)
Creates a new Complaint of the given type having
the given message. |
Complaint |
notify(int type,
String msg,
Input in,
int off,
int len)
Creates a new Complaint of the given type having
the given message at the given Input offset with
the given length. |
void |
setProperties(Properties p)
Sets the Properties instance. |
void |
setSource(String src)
Sets the name of the input source. |
String |
toString()
|
int |
warnings()
Returns the current number of warnings. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StandardAuditor()
Method Detail |
public void setSource(String src)
Auditor
setSource
in interface Auditor
public String getSource()
Auditor
getSource
in interface Auditor
public void setProperties(Properties p)
Auditor
Properties
instance.setProperties
in interface Auditor
public Properties getProperties()
Auditor
Properties
instance.getProperties
in interface Auditor
public boolean isEmpty()
Auditor
true
if there are no errors or warnings,
false
if there is at least one error or at least
one warning.isEmpty
in interface Auditor
public int complaints()
Auditor
errors() +
warnings()
).complaints
in interface Auditor
public int errors()
Auditor
errors
in interface Auditor
public int warnings()
Auditor
warnings
in interface Auditor
public boolean hasErrors()
Auditor
true
if there is at least one error,
false
otherwise.hasErrors
in interface Auditor
public boolean hasWarnings()
Auditor
true
if there is at least one warning,
false
otherwise.hasWarnings
in interface Auditor
public List getErrors()
Auditor
List
is an Complaint
.getErrors
in interface Auditor
public List getWarnings()
Auditor
List
is an Complaint
.getWarnings
in interface Auditor
public Complaint notify(int type, int line, String msg)
Auditor
Complaint
of the given type having
the given message and given line number. The
Complaint
is appended to the internal
List
of complaints and also returned to the
caller.notify
in interface Auditor
public Complaint notify(int type, String msg)
Auditor
Complaint
of the given type having
the given message. The Complaint
is appended to
the internal List
of complaints and also returned
to the caller.notify
in interface Auditor
public Complaint notify(int type, String msg, Input in, int off, int len)
Auditor
Complaint
of the given type having
the given message at the given Input
offset with
the given length. The Complaint
is appended to
the internal List
of complaints and also returned
to the caller. This method is generally used for syntactic
errors.notify
in interface Auditor
public Complaint notify(Complaint d)
Auditor
Complaint
to the end of the the
internal List
of complaints and returns the same
object to the caller.notify
in interface Auditor
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |