com.inxar.syntacs.translator
Class StandardAuditor.StandardComplaint

java.lang.Object
  |
  +--com.inxar.syntacs.translator.StandardAuditor.StandardComplaint
All Implemented Interfaces:
Complaint, Serializable
Enclosing class:
StandardAuditor

public class StandardAuditor.StandardComplaint
extends Object
implements Complaint, Serializable

See Also:
Serialized Form

Fields inherited from interface org.inxar.syntacs.translator.Complaint
LEXICAL_ERROR, SEMANTIC_ERROR, SEMANTIC_WARNING, SYNTACTIC_ERROR, UNSPECIFIED_ERROR
 
Method Summary
 int getLineNumber()
          Returns the line number of the error or -1 if it is not known.
 String getMessage()
          Returns a message describing this complaint.
 String getSource()
          Returns the name of the source file/URI/whatever or null if it is not known.
 int getType()
          Returns the type of this Complaint as one of the constants in this interface.
 void printMessage()
          Prints a trace of the Complaint to System.out.
 void printMessage(PrintStream out)
          Identical to printMessage() with the exception that output is written to the given PrintStream rather than System.out.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getType

public int getType()
Description copied from interface: Complaint
Returns the type of this Complaint as one of the constants in this interface.
Specified by:
getType in interface Complaint

getLineNumber

public int getLineNumber()
Description copied from interface: Complaint
Returns the line number of the error or -1 if it is not known. The first line is 1, there is no line zero.
Specified by:
getLineNumber in interface Complaint

getSource

public String getSource()
Description copied from interface: Complaint
Returns the name of the source file/URI/whatever or null if it is not known.
Specified by:
getSource in interface Complaint

getMessage

public String getMessage()
Description copied from interface: Complaint
Returns a message describing this complaint.
Specified by:
getMessage in interface Complaint

printMessage

public void printMessage()
Description copied from interface: Complaint
Prints a trace of the Complaint to System.out. The printMessage() and getMessage() operations are different in that printMessage() will synthesize a formatted output that may include all the other data (source URI, line number, etc...) whereas getMessage() will only return the message string. The contract is analogous to the printStackTrace() and getMessage() methods in the Throwable heirarchy.
Specified by:
printMessage in interface Complaint

printMessage

public void printMessage(PrintStream out)
Description copied from interface: Complaint
Identical to printMessage() with the exception that output is written to the given PrintStream rather than System.out.
Specified by:
printMessage in interface Complaint

toString

public String toString()
Overrides:
toString in class Object