com.sun.tdk.signaturetest.errors
Class SortedErrorFormatter

java.lang.Object
  extended by com.sun.tdk.signaturetest.errors.ErrorFormatter
      extended by com.sun.tdk.signaturetest.errors.SortedErrorFormatter
Direct Known Subclasses:
HumanErrorFormatter

public class SortedErrorFormatter
extends ErrorFormatter

SortedErrorFormatter formats error messages created by SignatureTest and by APIChangesTest. This class prints messages sorted error type and by name of class affected by the error.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.tdk.signaturetest.errors.ErrorFormatter
ErrorFormatter.Message
 
Field Summary
protected  java.util.List failedMessages
          Messages buffer.
protected  int tabSize
          Tabulator position.
 
Fields inherited from class com.sun.tdk.signaturetest.errors.ErrorFormatter
annoAdded, annoMissed, numErrors, numWarnings
 
Constructor Summary
SortedErrorFormatter(java.io.PrintWriter out, boolean isv)
          Assign the given PrintWriter to print error messages.
 
Method Summary
 void addError(MessageType kind, java.lang.String className, MemberType type, java.lang.String def, java.lang.String tail, MemberDescription errorObject)
          Append new error message to the failedMessages buffer.
protected  java.util.Map getTestedsuper()
           
 boolean isVerbose()
           
protected  boolean msgCompare(ErrorFormatter.Message m1, ErrorFormatter.Message m2)
           
 int msgExclude(java.util.Map supernames)
           
 void printErrors()
          Print all error messages collected by failedMessages.
protected  void setTestedsuper(java.util.Map testedsuper)
           
 void setVerbose(boolean verbose)
           
protected  void sortErrors()
           
protected static java.lang.String space(char c, int len)
          Return string consisting of len copies of the symbol c.
 void tested(ClassDescription tested)
           
 
Methods inherited from class com.sun.tdk.signaturetest.errors.ErrorFormatter
addError, createError, getNumErrors, getNumWarnings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

failedMessages

protected java.util.List failedMessages
Messages buffer.


tabSize

protected int tabSize
Tabulator position.

Constructor Detail

SortedErrorFormatter

public SortedErrorFormatter(java.io.PrintWriter out,
                            boolean isv)
Assign the given PrintWriter to print error messages.

Method Detail

tested

public void tested(ClassDescription tested)

addError

public void addError(MessageType kind,
                     java.lang.String className,
                     MemberType type,
                     java.lang.String def,
                     java.lang.String tail,
                     MemberDescription errorObject)
Append new error message to the failedMessages buffer.

Overrides:
addError in class ErrorFormatter
See Also:
failedMessages

printErrors

public void printErrors()
Print all error messages collected by failedMessages.

Overrides:
printErrors in class ErrorFormatter

sortErrors

protected void sortErrors()

space

protected static java.lang.String space(char c,
                                        int len)
Return string consisting of len copies of the symbol c.


msgExclude

public int msgExclude(java.util.Map supernames)

msgCompare

protected boolean msgCompare(ErrorFormatter.Message m1,
                             ErrorFormatter.Message m2)

getTestedsuper

protected java.util.Map getTestedsuper()

setTestedsuper

protected void setTestedsuper(java.util.Map testedsuper)

isVerbose

public boolean isVerbose()

setVerbose

public void setVerbose(boolean verbose)