Package proguard.classfile.util
Class WarningPrinter
- java.lang.Object
-
- proguard.classfile.util.WarningPrinter
-
- Direct Known Subclasses:
WarningLogger
public class WarningPrinter extends java.lang.Object
This class prints out and counts warnings.
-
-
Constructor Summary
Constructors Constructor Description WarningPrinter(java.io.PrintWriter printWriter)
Creates a new WarningPrinter that prints to the given print writer.WarningPrinter(java.io.PrintWriter printWriter, 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
note(java.lang.String className, java.lang.String message)
Prints out the given note without incrementing the warning count, if the given class name passes the class name filter.void
note(java.lang.String className1, java.lang.String className2, java.lang.String message)
Prints out the given note without incrementing the warning count, if the given class nams pass the class name filter.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.
-
-
-
Constructor Detail
-
WarningPrinter
public WarningPrinter(java.io.PrintWriter printWriter)
Creates a new WarningPrinter that prints to the given print writer.
-
WarningPrinter
public WarningPrinter(java.io.PrintWriter printWriter, 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.
-
note
public void note(java.lang.String className, java.lang.String message)
Prints out the given note without incrementing the warning count, if the given class name passes the class name filter.
-
note
public void note(java.lang.String className1, java.lang.String className2, java.lang.String message)
Prints out the given note without incrementing the warning count, if the given class nams pass the class name filter.
-
getWarningCount
public int getWarningCount()
Returns the number of warnings printed so far.
-
-