proguard.shrink
Class ShortestUsagePrinter

java.lang.Object
  extended by proguard.shrink.ShortestUsagePrinter
All Implemented Interfaces:
ClassVisitor, MemberVisitor

public class ShortestUsagePrinter
extends java.lang.Object
implements ClassVisitor, MemberVisitor

This ClassVisitor and MemberVisitor prints out the reasons why classes and class members have been marked as being used.

See Also:
UsageMarker

Constructor Summary
ShortestUsagePrinter(ShortestUsageMarker shortestUsageMarker)
          Creates a new UsagePrinter that prints verbosely to System.out.
ShortestUsagePrinter(ShortestUsageMarker shortestUsageMarker, boolean verbose)
          Creates a new UsagePrinter that prints to the given stream.
ShortestUsagePrinter(ShortestUsageMarker shortestUsageMarker, boolean verbose, java.io.PrintStream printStream)
          Creates a new UsagePrinter that prints to the given stream.
 
Method Summary
 void visitLibraryClass(LibraryClass libraryClass)
           
 void visitLibraryField(LibraryClass libraryClass, LibraryField libraryField)
           
 void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod)
           
 void visitProgramClass(ProgramClass programClass)
           
 void visitProgramField(ProgramClass programClass, ProgramField programField)
           
 void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShortestUsagePrinter

public ShortestUsagePrinter(ShortestUsageMarker shortestUsageMarker)
Creates a new UsagePrinter that prints verbosely to System.out.

Parameters:
shortestUsageMarker - the usage marker that was used to mark the classes and class members.

ShortestUsagePrinter

public ShortestUsagePrinter(ShortestUsageMarker shortestUsageMarker,
                            boolean verbose)
Creates a new UsagePrinter that prints to the given stream.

Parameters:
shortestUsageMarker - the usage marker that was used to mark the classes and class members.
verbose - specifies whether the output should be verbose.

ShortestUsagePrinter

public ShortestUsagePrinter(ShortestUsageMarker shortestUsageMarker,
                            boolean verbose,
                            java.io.PrintStream printStream)
Creates a new UsagePrinter that prints to the given stream.

Parameters:
shortestUsageMarker - the usage marker that was used to mark the classes and class members.
verbose - specifies whether the output should be verbose.
printStream - the stream to which to print.
Method Detail

visitProgramClass

public void visitProgramClass(ProgramClass programClass)
Specified by:
visitProgramClass in interface ClassVisitor

visitLibraryClass

public void visitLibraryClass(LibraryClass libraryClass)
Specified by:
visitLibraryClass in interface ClassVisitor

visitProgramField

public void visitProgramField(ProgramClass programClass,
                              ProgramField programField)
Specified by:
visitProgramField in interface MemberVisitor

visitProgramMethod

public void visitProgramMethod(ProgramClass programClass,
                               ProgramMethod programMethod)
Specified by:
visitProgramMethod in interface MemberVisitor

visitLibraryField

public void visitLibraryField(LibraryClass libraryClass,
                              LibraryField libraryField)
Specified by:
visitLibraryField in interface MemberVisitor

visitLibraryMethod

public void visitLibraryMethod(LibraryClass libraryClass,
                               LibraryMethod libraryMethod)
Specified by:
visitLibraryMethod in interface MemberVisitor