Usage
Typically:
Options
Notes:
- class_path is a list of jars, apks, aabs, aars, wars, ears, jmods, zips, and directories, with optional filters, separated by path separators.
- filename can contain Java system properties delimited by ‘<’ and ‘>’.
- If filename contains special characters, the entire name should be quoted with single or double quotes.
Overview of Keep
Options {: #keepoverview}
Keep Option Modifiers {: #keepoptionmodifiers}
Class Specifications {: #classspecification}
[@annotationtype] [[!]public|final|abstract|@ ...] [!]interface|class|enum classname
[extends|implements [@annotationtype] classname]
[{
[@annotationtype]
[[!]public|private|protected|static|volatile|transient ...]
<fields> | (fieldtype fieldname [= values]);
[@annotationtype]
[[!]public|private|protected|static|synchronized|native|abstract|strictfp ...]
<methods> | <init>(argumenttype,...) | classname(argumenttype,...) | (returntype methodname(argumenttype,...));
[@annotationtype] [[!]public|private|protected|static ... ] *;
...
}]
Notes:
- Class names must always be fully qualified, i.e. including their package names.
- Types in classname, annotationtype, returntype, and argumenttype can contain wildcards: ‘
?
’ for a single character, ‘*
’ for any number of characters (but not the package separator), ‘**
’ for any number of (any) characters, ‘%
’ for any primitive type, ‘***
’ for any type, ‘...
’ for any number of arguments, and ‘<n>
’ for the n'th matched wildcard in the same option. - fieldname and methodname can contain wildcards as well: ‘
?
’ for a single character and ‘*
’ for any number of characters.