Package Name | Comment |
proguard |
This package contains the main ProGuard application.
ProGuard can read jar files, shrink and obfuscate them, and write out the
resulting jar file.
|
proguard.annotation | |
proguard.ant |
This package contains the Ant task for ProGuard.
|
proguard.classfile |
This package contains classes to represent the various elements of class files.
A class file is represented by the {@link proguard.classfile.ClassFile
ClassFile} interface. This interface currently has two alternative
representations:
{@link ProgramClassFile ProgramClassFile} :
a complete representation that can be read, modified, and written back.
{@link LibraryClassFile LibraryClassFile} :
an incomplete representation that can be only be read. It is however
more compact than ProgramClassFile , and sufficient for
analyzing class files from library jars.
|
proguard.classfile.attribute |
This package contains classes to represent the attributes inside class files.
|
proguard.classfile.attribute.annotation |
This package contains classes to represent the annotation attributes inside
class files.
|
proguard.classfile.attribute.annotation.visitor |
This package contains visitors for annotation attributes and their components.
|
proguard.classfile.attribute.preverification | |
proguard.classfile.attribute.preverification.visitor | |
proguard.classfile.attribute.visitor |
This package contains visitors for attributes and their components.
|
proguard.classfile.constant | |
proguard.classfile.constant.visitor |
This package contains visitors for class constants.
|
proguard.classfile.editor |
This package contains visitors to edit byte code.
|
proguard.classfile.instruction |
This package contains classes to represent Java bytecode instructions.
Not every instruction currently has its own class. Only groups of instructions
that refer to the constant pool get their own representations.
While the package is sufficient for the current needs of the ProGuard
application, it may very well be reorganised and extended in the future.
|
proguard.classfile.instruction.visitor |
This package contains visitors for instructions.
|
proguard.classfile.io |
This package contains classes for reading and writing class files.
|
proguard.classfile.util |
This package contains utility classes for processing class files.
|
proguard.classfile.visitor |
This package contains interfaces and classes for processing class files from
the {@link proguard.classfile proguard.classfile} package using
the visitor pattern. Cfr., for instance, "Design Patterns, Elements of
Reusable OO Software", by Gamma, Helm, Johnson, and Vlissider.
Why the visitor pattern? Class files frequently contain lists of elements of
various mixed types: class items, constant pool entries, attributes,...
These lists and types are largely fixed; they won't change much in future
releases of the Java class file specifications. On the other hand, the kinds
of operations that we may wish to perform on the class files may change and
expand. We want to separate the objects and the operations performed upon them.
This is a good place to use the visitor pattern.
Visitor interfaces avoid having to do series of instanceof tests
on the elements of a list, followed by type casts and the proper operations.
Every list element is a visitor accepter. When its accept method
is called by a visitor, it calls its corresponding visitX method
in the visitor, passing itself as an argument. This technique is called
double-dispatch.
As already mentioned, the main advantage is avoiding lots of
instanceof tests and type casts. Also, implementing a visitor
interface ensures you're handling all possible visitor accepter types. Each
type has its own method, which you simply have to implement.
A disadvantage is that the visitor methods always get the same names, specified
by the visitor interface. These names aren't descriptive at all, making code
harder to read. It's the visitor classes that describe the operations now.
Also, the visitor methods always have the same parameters and return values, as
specified by the visitor interfaces. Passing additional parameters is done by
means of extra fields in the visitor, which is somewhat of a kludge.
Because objects (the visitor accepters) and the operations performed upon them
(the visitors) are now separated, it becomes harder to associate some state
with the objects. For convenience, we always provide an extra visitor
info field in visitor accepters, in which visitors can put any temporary
information they want.
|
proguard.evaluation | |
proguard.evaluation.value |
This package contains classes that represent partial evaluation values.
|
proguard.gui |
This package contains a GUI for ProGuard and ReTrace.
|
proguard.gui.splash |
This package contains a library for creating splash screens and animations
with text, graphical elements, and some special effects.
|
proguard.io |
This package contains classes to read and write files, optionally wrapped in
jars, wars, ears, zips, directories,...
|
proguard.obfuscate |
This package contains classes to perform obfuscation of class files.
|
proguard.optimize |
This package contains visitors that assist with various optimizations of byte
code.
|
proguard.optimize.evaluation |
This package contains visitors that perform partial evaluation and subsequent
optimizations on byte code.
|
proguard.optimize.info |
This package contains classes to collect additional information about classes
and class members, which can then be used for optimization.
|
proguard.optimize.peephole |
This package contains visitors that perform various peephole optimizations.
|
proguard.preverify | |
proguard.retrace |
This package contains the main ReTrace application.
ReTrace can de-obfuscate stack traces of obfuscated programs.
|
proguard.shrink |
This package contains classes to perform shrinking of class files.
|
proguard.util |
This package contains utility classes for regular expression matching,...
|
proguard.wtk |
This package contains the J2ME Wireless Toolkit plug-in for ProGuard.
|