Scripting Language - RetroGuard Documentation


Prev   Contents   Next

RetroGuard uses a simple scripting language to specify which identifiers are to be left unchanged by obfuscation. Certain names must be reserved from obfuscation because they are intended to be accessed from outside. These reserved names can include the 'main' method and class of applications, any classes derived from 'Applet', as well as JavaBean classes. For the writers of Java libraries this list of reserved names can become quite extensive due the the large number of entry points into the code. The RetroGuard script file is a listing of these reserved names.

Also, by default, all unnecessary class attributes are trimmed from each class during obfuscation. In case any of these attributes are to be retained, this can also be done using the script file. In particular, note that in order to retain line number information in debugging reports from obfuscated code, both the SourceFile and the LineNumberTable attributes must be preserved.

In the following pages, we detail RetroGuard's internal default script as well as options that allow applications, serializable classes, and RMI classes to be preserved easily. Following that is a full BNF grammar for the scripting language, and detailed examples for each language feature.


Prev   Contents   Next
 Copyright © 1998-2007 Retrologic Systems.
 All rights reserved.