1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610
|
<!doctype html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-style-type" content="text/css">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Ant Task</title>
</head>
<body>
<h2>Ant Task</h2>
<b>ProGuard</b> can be run as a task in the Java-based build tool Ant (version
1.6.0 or higher).
<p>
Before you can use the <code>proguard</code> task, you have to tell Ant about
this new task. The easiest way is to add the following line to your
<code>build.xml</code> file:
<p>
<pre>
<taskdef resource="proguard/ant/task.properties"
classpath="/usr/local/java/proguard/lib/proguard.jar" />
</pre>
<p>
Please make sure the class path is set correctly for your system.
<p>
There are three ways to configure the ProGuard task: using an external
configuration file, using embedded ProGuard configuration options, or using
the equivalent XML configuration tags. These three ways can be combined,
depending on practical circumstances and personal preference.
<p>
<h3>1. An external ProGuard configuration file</h3>
The simplest way to use the ProGuard task in an Ant build file is to keep your
ProGuard configuration file, and include it from Ant. You can include your
ProGuard configuration file by setting
the <a href="#configuration_attribute"><code>configuration</code></a>
attribute of your
<code>proguard</code> task. Your ant build file will then look like this:
<p>
<pre>
<taskdef resource="proguard/ant/task.properties"
classpath="/usr/local/java/proguard/lib/proguard.jar" />
<proguard configuration="myconfigfile.pro"/>
</pre>
<p>
This is a convenient option if you prefer ProGuard's configuration style over
XML, if you want to keep your build file small, or if you have to share your
configuration with developers who don't use Ant.
<p>
<h3>2. Embedded ProGuard configuration options</h3>
Instead of keeping an external ProGuard configuration file, you can also copy
the contents of the file into the nested text of the <code>proguard</code> task
(the PCDATA area). Your Ant build file will then look like this:
<p>
<pre>
<taskdef resource="proguard/ant/task.properties"
classpath="/usr/local/java/proguard/lib/proguard.jar" />
<proguard>
-libraryjars ${java.home}/lib/rt.jar
-injars in.jar
-outjars out.jar
-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
</proguard>
</pre>
<p>
Some minor syntactical changes are required in order to conform with the XML
standard.
<p>
Firstly, the <code>#</code> character cannot be used for comments in an XML
file. Comments must be enclosed by an opening <code><!--</code> and a
closing <code>--></code>. All occurrences of the <code>#</code> character
can be removed.
<p>
Secondly, the use of <code><</code> and <code>></code> characters would
upset the structure of the XML build file. Environment variables are now
enclosed by an opening <code>${</code> and a closing <code>}</code>. This
syntax also allows you to use Ant properties within the ProGuard
configuration. Other occurrences of <code><</code> and <code>></code>
have to be encoded as <code>&lt;</code> and <code>&gt;</code>.
<p>
<h3>3. XML configuration tags</h3>
If you really prefer a full-blown XML configuration, you can replace the
ProGuard configuration options by XML configuration tags. The resulting
configuration will be equivalent, but much more verbose and difficult to read,
as XML goes. The remainder of this page presents the supported tags. For a
more extensive discussion of their meaning, please consult the traditional <a
href="usage.html">Usage</a> section. You can find some sample configuration
files in the <code>examples/ant</code> directory of the ProGuard distribution.
<p>
<a name="proguard"> </a>
<h2>Task Attributes and Nested Elements</h2>
The <code><b><proguard></b></code> task and the
<code><b><proguardconfiguration></b></code> task can have the following
attributes (only for <code><proguard></code>) and nested
elements:
<dl>
<dt><a name="configuration_attribute"><code><b>configuration</b></code></a>
= "<i>filename</i>"</dt>
<dd>Read and merge options from the given ProGuard-style configuration
file. Note: for reading XML-style configurations, use the <a
href="#configuration_element"><code>configuration</code></a>
<i>element</i>.</dd>
<dt><a href="usage.html#dontskipnonpubliclibraryclasses"><code><b>skipnonpubliclibraryclasses</b></code></a>
= "<i>boolean</i>"
(default = true)</dt>
<dd>Ignore non-public library classes.</dd>
<dt><a href="usage.html#dontskipnonpubliclibraryclassmembers"><code><b>skipnonpubliclibraryclassmembers</b></code></a>
= "<i>boolean</i>"
(default = true)</dt>
<dd>Ignore package visible library class members.</dd>
<dt><a href="usage.html#target"><code><b>target</b></code></a>
= "<i>version</i>"
(default = none)</dt>
<dd>Set the given version number in the processed classes.</dd>
<dt><a href="usage.html#forceprocessing"><code><b>forceprocessing</b></code></a>
= "<i>boolean</i>"
(default = false)</dt>
<dd>Process the input, even if the output seems up to date.</dd>
<dt><a href="usage.html#printseeds"><code><b>printseeds</b></code></a>
= "<i>boolean or filename</i>"
(default = false)</dt>
<dd>List classes and class members matched by the various <code>keep</code>
commands, to the standard output or to the given file.</dd>
<dt><a href="usage.html#dontshrink"><code><b>shrink</b></code></a>
= "<i>boolean</i>"
(default = true)</dt>
<dd>Shrink the input class files.</dd>
<dt><a href="usage.html#printusage"><code><b>printusage</b></code></a>
= "<i>boolean or filename</i>"
(default = false)</dt>
<dd>List dead code of the input class files, to the standard output or to the
given file.</dd>
<dt><a href="usage.html#dontoptimize"><code><b>optimize</b></code></a>
= "<i>boolean</i>"
(default = true)</dt>
<dd>Optimize the input class files.</dd>
<dt><a href="usage.html#optimizationpasses"><code><b>optimizationpasses</b></code></a>
= "<i>n</i>"
(default = 1)</dt>
<dd>The number of optimization passes to be performed.</dd>
<dt><a href="usage.html#allowaccessmodification"><code><b>allowaccessmodification</b></code></a>
= "<i>boolean</i>"
(default = false)</dt>
<dd>Allow the access modifiers of classes and class members to be modified,
while optimizing.</dd>
<dt><a href="usage.html#mergeinterfacesaggressively"><code><b>mergeinterfacesaggressively</b></code></a>
= "<i>boolean</i>"
(default = false)</dt>
<dd>Allow any interfaces to be merged, while optimizing.</dd>
<dt><a href="usage.html#dontobfuscate"><code><b>obfuscate</b></code></a>
= "<i>boolean</i>"
(default = true)</dt>
<dd>Obfuscate the input class files.</dd>
<dt><a href="usage.html#printmapping"><code><b>printmapping</b></code></a>
= "<i>boolean or filename</i>"
(default = false)</dt>
<dd>Print the mapping from old names to new names for classes and class members
that have been renamed, to the standard output or to the given file.</dd>
<dt><a href="usage.html#applymapping"><code><b>applymapping</b></code></a>
= "<i>filename</i>"
(default = none)</dt>
<dd>Reuse the given mapping, for incremental obfuscation.</dd>
<dt><a href="usage.html#obfuscationdictionary"><code><b>obfuscationdictionary</b></code></a>
= "<i>filename</i>"
(default = none)</dt>
<dd>Use the words in the given text file as obfuscated field names and method
names.</dd>
<dt><a href="usage.html#classobfuscationdictionary"><code><b>classobfuscationdictionary</b></code></a>
= "<i>filename</i>"
(default = none)</dt>
<dd>Use the words in the given text file as obfuscated class names.</dd>
<dt><a href="usage.html#packageobfuscationdictionary"><code><b>packageobfuscationdictionary</b></code></a>
= "<i>filename</i>"
(default = none)</dt>
<dd>Use the words in the given text file as obfuscated package names.</dd>
<dt><a href="usage.html#overloadaggressively"><code><b>overloadaggressively</b></code></a>
= "<i>boolean</i>"
(default = false)</dt>
<dd>Apply aggressive overloading while obfuscating.</dd>
<dt><a href="usage.html#useuniqueclassmembernames"><code><b>useuniqueclassmembernames</b></code></a>
= "<i>boolean</i>"
(default = false)</dt>
<dd>Ensure uniform obfuscated class member names for subsequent incremental
obfuscation.</dd>
<dt><a href="usage.html#dontusemixedcaseclassnames"><code><b>usemixedcaseclassnames</b></code></a>
= "<i>boolean</i>"
(default = true)</dt>
<dd>Generate mixed-case class names while obfuscating.</dd>
<dt><a href="usage.html#flattenpackagehierarchy"><code><b>flattenpackagehierarchy</b></code></a>
= "<i>package_name</i>"
(default = none)</dt>
<dd>Repackage all packages that are renamed into the single given parent
package.</dd>
<dt><a href="usage.html#repackageclasses"><code><b>repackageclasses</b></code></a>
= "<i>package_name</i>"
(default = none)</dt>
<dd>Repackage all class files that are renamed into the single given
package.</dd>
<dt><a href="usage.html#renamesourcefileattribute"><code><b>renamesourcefileattribute</b></code></a>
= "<i>string</i>"
(default = none)</dt>
<dd>Put the given constant string in the <code>SourceFile</code>
attributes.</dd>
<dt><a href="usage.html#dontpreverify"><code><b>preverify</b></code></a>
= "<i>boolean</i>"
(default = true)</dt>
<dd>Preverify the processed class files if they are targeted at Java Micro
Edition or at Java 6 or higher.</dd>
<dt><a href="usage.html#microedition"><code><b>microedition</b></code></a>
= "<i>boolean</i>"
(default = false)</dt>
<dd>Targets the processed class files at Java Micro Edition.</dd>
<dt><a href="usage.html#verbose"><code><b>verbose</b></code></a>
= "<i>boolean</i>"
(default = false)</dt>
<dd>Write out some more information during processing.</dd>
<dt><a href="usage.html#dontnote"><code><b>note</b></code></a>
= "<i>boolean</i>"
(default = true)</dt>
<dd>Print notes about potential mistakes or omissions in the configuration.
Use the nested element <a href="#dontnote">dontnote</a> for more
fine-grained control.</dd>
<dt><a href="usage.html#dontwarn"><code><b>warn</b></code></a>
= "<i>boolean</i>"
(default = true)</dt>
<dd>Print warnings about unresolved references. Use the nested
element <a href="#dontwarn">dontwarn</a> for more fine-grained
control. <i>Only use this option if you know what you're doing!</i></dd>
<dt><a href="usage.html#ignorewarnings"><code><b>ignorewarnings</b></code></a>
= "<i>boolean</i>"
(default = false)</dt>
<dd>Print warnings about unresolved references, but continue processing
anyhow. <i>Only use this option if you know what you're doing!</i></dd>
<dt><a href="usage.html#printconfiguration"><code><b>printconfiguration</b></code></a>
= "<i>boolean or filename</i>"
(default = false)</dt>
<dd>Write out the entire configuration in traditional ProGuard style, to the
standard output or to the given file. Useful to replace unreadable
XML configurations.</dd>
<dt><a href="usage.html#dump"><code><b>dump</b></code></a>
= "<i>boolean or filename</i>"
(default = false)</dt>
<dd>Write out the internal structure of the processed class files, to the
standard output or to the given file.</dd>
<dt><a href="usage.html#injars"><code><b><injar</b></code></a>
<a href="#classpath"><i>class_path</i></a>
<code><b>/></b></code></dt>
<dd>Specifies the program jars (or wars, ears, zips, or directories).</dd>
<dt><a href="usage.html#outjars"><code><b><outjar</b></code></a>
<a href="#classpath"><i>class_path</i></a>
<code><b>/></b></code></dt>
<dd>Specifies the name of the output jars (or wars, ears, zips, or
directories).</dd>
<dt><a href="usage.html#libraryjars"><code><b><libraryjar</b></code></a>
<a href="#classpath"><i>class_path</i></a>
<code><b>/></b></code></dt>
<dd>Specifies the library jars (or wars, ears, zips, or directories).</dd>
<dt><a href="usage.html#keepdirectories"><code><b><keepdirectory name = </b></code></a>"<i>directory_name</i>"
<code><b>/></b></code><br/>
<a href="usage.html#keepdirectories"><code><b><keepdirectories filter = </b></code></a>"<a href="usage.html#filefilters"><i>directory_filter</i></a>"
<code><b>/></b></code></dt>
<dd>Keep the specified directories in the output jars (or wars, ears, zips, or
directories).</dd>
<dt><a href="usage.html#keep"><code><b><keep</b></code></a>
<a href="#keepmodifier"><i>modifiers</i></a>
<a href="#classspecification"><i>class_specification</i></a>
<code><b>></b></code>
<a href="#classmemberspecification"><i>class_member_specifications</i></a>
<code><b></keep></b></code></dt>
<dd>Preserve the specified classes <i>and</i> class members.</dd>
<dt><a href="usage.html#keepclassmembers"><code><b><keepclassmembers</b></code></a>
<a href="#keepmodifier"><i>modifiers</i></a>
<a href="#classspecification"><i>class_specification</i></a>
<code><b>></b></code>
<a href="#classmemberspecification"><i>class_member_specifications</i></a>
<code><b></keepclassmembers></b></code></dt>
<dd>Preserve the specified class members, if their classes are preserved as
well.</dd>
<dt><a href="usage.html#keepclasseswithmembers"><code><b><keepclasseswithmembers</b></code></a>
<a href="#keepmodifier"><i>modifiers</i></a>
<a href="#classspecification"><i>class_specification</i></a>
<code><b>></b></code>
<a href="#classmemberspecification"><i>class_member_specifications</i></a>
<code><b></keepclasseswithmembers></b></code></dt>
<dd>Preserve the specified classes <i>and</i> class members, if all of the
specified class members are present.</dd>
<dt><a href="usage.html#keepnames"><code><b><keepnames</b></code></a>
<a href="#classspecification"><i>class_specification</i></a>
<code><b>></b></code>
<a href="#classmemberspecification"><i>class_member_specifications</i></a>
<code><b></keepnames></b></code></dt>
<dd>Preserve the names of the specified classes <i>and</i> class members (if
they aren't removed in the shrinking step).</dd>
<dt><a href="usage.html#keepclassmembernames"><code><b><keepclassmembernames</b></code></a>
<a href="#classspecification"><i>class_specification</i></a>
<code><b>></b></code>
<a href="#classmemberspecification"><i>class_member_specifications</i></a>
<code><b></keepclassmembernames></b></code></dt>
<dd>Preserve the names of the specified class members (if they aren't removed
in the shrinking step).</dd>
<dt><a href="usage.html#keepclasseswithmembernames"><code><b><keepclasseswithmembernames</b></code></a>
<a href="#classspecification"><i>class_specification</i></a>
<code><b>></b></code>
<a href="#classmemberspecification"><i>class_member_specifications</i></a>
<code><b></keepclasseswithmembernames></b></code></dt>
<dd>Preserve the names of the specified classes <i>and</i> class members, if
all of the specified class members are present (after the shrinking
step).</dd>
<dt><a href="usage.html#whyareyoukeeping"><code><b><whyareyoukeeping</b></code></a>
<a href="#classspecification"><i>class_specification</i></a>
<code><b>></b></code>
<a href="#classmemberspecification"><i>class_member_specifications</i></a>
<code><b></whyareyoukeeping></b></code></dt>
<dd>Print details on why the given classes and class members are being kept in
the shrinking step.</dd>
<dt><a href="usage.html#assumenosideeffects"><code><b><assumenosideeffects</b></code></a>
<a href="#classspecification"><i>class_specification</i></a>
<code><b>></b></code>
<a href="#classmemberspecification"><i>class_member_specifications</i></a>
<code><b></assumenosideeffects></b></code></dt>
<dd>Assume that the specified methods don't have any side effects, while
optimizing. <i>Only use this option if you know what you're
doing!</i></dd>
<dt><a href="usage.html#optimizations"><code><b><optimization name = </b></code></a>"<a href="optimizations.html"><i>optimization_name</i></a>"
<code><b>/></b></code><br/>
<a href="usage.html#optimizations"><code><b><optimizations filter = </b></code></a>""<a href="optimizations.html"><i>optimization_filter</i></a>"
<code><b>/></b></code></dt>
<dd>Perform only the specified optimizations.</dd>
<dt><a href="usage.html#keeppackagenames"><code><b><keeppackagename name = </b></code></a>"<i>package_name</i>"
<code><b>/></b></code><br/>
<a href="usage.html#keeppackagenames"><code><b><keeppackagenames filter = </b></code></a>"<a href="usage.html#filters"><i>package_filter</i></a>"
<code><b>/></b></code></dt>
<dd>Keep the specified package names from being obfuscated. If no name is
given, all package names are preserved.</dd>
<dt><a href="usage.html#keepattributes"><code><b><keepattribute name = </b></code></a>"<i>attribute_name</i>"
<code><b>/></b></code><br/>
<a href="usage.html#keepattributes"><code><b><keepattributes filter = </b></code></a>"<a href="usage.html#filters"><i>attribute_filter</i></a>"
<code><b>/></b></code></dt>
<dd>Preserve the specified optional Java bytecode attributes, with optional
wildcards. If no name is given, all attributes are preserved.</dd>
<dt><a href="usage.html#adaptclassstrings"><code><b><adaptclassstrings filter = </b></code></a>"<a href="usage.html#filters"><i>class_filter</i></a>"
<code><b>/></b></code></dt>
<dd>Adapt string constants in the specified classes, based on the obfuscated
names of any corresponding classes.</dd>
<dt><a href="usage.html#adaptresourcefilenames"><code><b><adaptresourcefilenames filter = </b></code></a>"<a href="usage.html#filefilters"><i>file_filter</i></a>"
<code><b>/></b></code></dt>
<dd>Rename the specified resource files, based on the obfuscated names of the
corresponding class files.</dd>
<dt><a href="usage.html#adaptresourcefilecontents"><code><b><adaptresourcefilecontents filter = </b></code></a>"<a href="usage.html#filefilters"><i>file_filter</i></a>"
<code><b>/></b></code></dt>
<dd>Update the contents of the specified resource files, based on the
obfuscated names of the processed classes.</dd>
<dt><a name="dontnote" />
<a href="usage.html#dontnote"><code><b><dontnote filter = </b></code></a>"<a href="usage.html#filters"><i>class_filter</i></a>"
<code><b>/></b></code></dt>
<dd>Don't print notes about classes matching the specified class name
filter.</dd>
<dt><a name="dontwarn" />
<a href="usage.html#dontwarn"><code><b><dontwarn filter = </b></code></a>"<a href="usage.html#filters"><i>class_filter</i></a>"
<code><b>/></b></code></dt>
<dd>Don't print warnings about classes matching the specified class name
filter. <i>Only use this option if you know what you're doing!</i></dd>
<dt><a name="configuration_element"><code><b><configuration refid = </b></code></a>"<i>ref_id</i>"
<code><b>/></b></code></dt>
<dd>Includes the configuration specified in the
<code><proguardconfiguration></code> task (or
<code><proguard></code> task) with the attribute <code>id</code> =
"<i>ref_id</i>". Note that only the nested elements of this configuration
are considered, not the attributes. Also note: for reading ProGuard-style
configuration files, use the <a
href="#configuration_attribute"><code>configuration</code></a>
<i>attribute</i>.</dd>
</dl>
<a name="classpath"> </a>
<h2>Class Path Attributes and Nested Elements</h2>
The jar tags are path tags, so they can have any of the path attributes (or
nested elements). The most common attributes are:
<dl>
<dt><code><b>path</b></code> = "<i>path</i>"</dt>
<dd>The names of the jars (or wars, ears, zips, or directories), separated by
the path separator.</dd>
<dt><code><b>location</b></code> = "<i>name</i>" (or <code><b>file</b></code>
= "<i>name</i>", or <code><b>dir</b></code> = "<i>name</i>", or
<code><b>name</b></code> = "<i>name</i>")</dt>
<dd>Alternatively, the name of a single jar (or war, ear, zip, or
directory).</dd>
<dt><code><b>refid</b></code> = "<i>ref_id</i>"</dt>
<dd>Alternatively, a reference to the path or file set with the attribute
<code>id</code> = "<i>ref_id</i>".</dd>
</dl>
In addition, the jar tags can have ProGuard-style filter attributes:
<dl>
<dt><code><b>filter</b></code> =
"<a href="usage.html#filefilters"><i>file_filter</i></a>"</dt>
<dd>An optional filter for all class file names and resource file names that
are encountered.</dd>
<dt><code><b>jarfilter</b></code> =
"<a href="usage.html#filefilters"><i>file_filter</i></a>"</dt>
<dd>An optional filter for all jar names that are encountered.</dd>
<dt><code><b>warfilter</b></code> =
"<a href="usage.html#filefilters"><i>file_filter</i></a>"</dt>
<dd>An optional filter for all war names that are encountered.</dd>
<dt><code><b>earfilter</b></code> =
"<a href="usage.html#filefilters"><i>file_filter</i></a>"</dt>
<dd>An optional filter for all ear names that are encountered.</dd>
<dt><code><b>zipfilter</b></code> =
"<a href="usage.html#filefilters"><i>file_filter</i></a>"</dt>
<dd>An optional filter for all zip names that are encountered.</dd>
</dl>
<a name="keepmodifier"> </a>
<h2>Keep Modifier Attributes</h2>
The keep tags can have the following <i>modifier</i> attributes:
<dl>
<dt><a href="usage.html#allowshrinking"><code><b>allowshrinking</b></code></a>
= "<i>boolean</i>"
(default = false)</dt>
<dd>Specifies whether the entry points specified in the keep tag may be
shrunk.</dd>
<dt><a href="usage.html#allowoptimization"><code><b>allowoptimization</b></code></a>
= "<i>boolean</i>"
(default = false)</dt>
<dd>Specifies whether the entry points specified in the keep tag may be
optimized.</dd>
<dt><a href="usage.html#allowobfuscation"><code><b>allowobfuscation</b></code></a>
= "<i>boolean</i>"
(default = false)</dt>
<dd>Specifies whether the entry points specified in the keep tag may be
obfuscated.</dd>
</dl>
<a name="classspecification"> </a>
<h2>Class Specification Attributes and Nested Elements</h2>
The keep tags can have the following <i>class_specification</i> attributes and
<i>class_member_specifications</i> nested elements:
<dl>
<dt><code><b>access</b></code> = "<i>access_modifiers</i>"</dt>
<dd>The optional access modifiers of the class. Any space-separated list of
"public", "final", and "abstract", with optional negators "!".</dd>
<dt><code><b>type</b></code> = "<i>type</i>"</dt>
<dd>The optional type of the class: one of "class", "interface", or
"!interface".</dd>
<dt><code><b>name</b></code> = "<i>class_name</i>"</dt>
<dd>The optional fully qualified name of the class, with optional
wildcards.</dd>
<dt><code><b>extends</b></code> = "<i>class_name</i>"</dt>
<dd>The optional fully qualified name of the class the specified classes
must extend, with optional wildcards.</dd>
<dt><code><b>implements</b></code> = "<i>class_name</i>"</dt>
<dd>The optional fully qualified name of the class the specified classes
must implement, with optional wildcards.</dd>
<dt><code><b><field</b></code>
<a href="#classmemberspecification"><i>class_member_specification</i></a>
<code><b>/></b></code></dt>
<dd>Specifies a field.</dd>
<dt><code><b><method</b></code>
<a href="#classmemberspecification"><i>class_member_specification</i></a>
<code><b>/></b></code></dt>
<dd>Specifies a method.</dd>
<dt><code><b><constructor</b></code>
<a href="#classmemberspecification"><i>class_member_specification</i></a>
<code><b>/></b></code></dt>
<dd>Specifies a constructor.</dd>
</dl>
<a name="classmemberspecification"> </a>
<h2>Class Member Specification Attributes</h2>
The class member tags can have the following <i>class_member_specification</i>
attributes:
<dl>
<dt><code><b>access</b></code> = "<i>access_modifiers</i>"</dt>
<dd>The optional access modifiers of the class. Any space-separated list of
"public", "protected", "private", "static", etc., with optional negators
"!".</dd>
<dt><code><b>type</b></code> = "<i>type</i>"</dt>
<dd>The optional fully qualified type of the class member, with optional
wildcards. Not applicable for constructors, but required for methods for
which the <code>parameters</code> attribute is specified.</dd>
<dt><code><b>name</b></code> = "<i>name</i>"</dt>
<dd>The optional name of the class member, with optional wildcards. Not
applicable for constructors.</dd>
<dt><code><b>parameters</b></code> = "<i>parameters</i>"</dt>
<dd>The optional comma-separated list of fully qualified method parameters,
with optional wildcards. Not applicable for fields, but required for
constructors, and for methods for which the <code>type</code> attribute is
specified.</dd>
</dl>
<hr>
<address>
Copyright © 2002-2009
<a href="http://www.graphics.cornell.edu/~eric/">Eric Lafortune</a>.
</address>
</body>
</html>
|