proguard.classfile.util
Class WarningPrinter

java.lang.Object
  extended by proguard.classfile.util.WarningPrinter

public class WarningPrinter
extends java.lang.Object

This class prints out and counts warnings.


Constructor Summary
WarningPrinter()
          Creates a new WarningPrinter that prints to the System.err print stream.
WarningPrinter(java.io.PrintStream printStream)
          Creates a new WarningPrinter that prints to the given print stream.
WarningPrinter(java.io.PrintStream printStream, java.util.List classFilter)
          Creates a new WarningPrinter that prints to the given print stream, except if the names of any involved classes matches the given filter.
 
Method Summary
 boolean accepts(java.lang.String className)
          Returns whether the given class name passes the class name filter.
 boolean accepts(java.lang.String className1, java.lang.String className2)
          Returns whether the given class names pass the class name filter.
 int getWarningCount()
          Returns the number of warnings printed so far.
 void print(java.lang.String className, java.lang.String warning)
          Prints out the given warning and increments the warning count, if the given class name passes the class name filter.
 void print(java.lang.String className1, java.lang.String className2, java.lang.String warning)
          Prints out the given warning and increments the warning count, if the given class names pass the class name filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WarningPrinter

public WarningPrinter()
Creates a new WarningPrinter that prints to the System.err print stream.


WarningPrinter

public WarningPrinter(java.io.PrintStream printStream)
Creates a new WarningPrinter that prints to the given print stream.


WarningPrinter

public WarningPrinter(java.io.PrintStream printStream,
                      java.util.List classFilter)
Creates a new WarningPrinter that prints to the given print stream, except if the names of any involved classes matches the given filter.

Method Detail

print

public void print(java.lang.String className,
                  java.lang.String warning)
Prints out the given warning and increments the warning count, if the given class name passes the class name filter.


accepts

public boolean accepts(java.lang.String className)
Returns whether the given class name passes the class name filter.


print

public void print(java.lang.String className1,
                  java.lang.String className2,
                  java.lang.String warning)
Prints out the given warning and increments the warning count, if the given class names pass the class name filter.


accepts

public boolean accepts(java.lang.String className1,
                       java.lang.String className2)
Returns whether the given class names pass the class name filter.


getWarningCount

public int getWarningCount()
Returns the number of warnings printed so far.