• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# The default configuration when starting up the GUI.
2
3-libraryjars <java.home>/lib/rt.jar
4
5# Keep - Applications. Keep all application classes, along with their 'main'
6# methods.
7-keepclasseswithmembers public class * {
8    public static void main(java.lang.String[]);
9}
10
11# Also keep - Enumerations. Keep the special static methods that are required in
12# enumeration classes.
13-keepclassmembers enum * {
14    public static **[] values();
15    public static ** valueOf(java.lang.String);
16}
17
18# Also keep - Database drivers. Keep all implementations of java.sql.Driver.
19-keep class * extends java.sql.Driver
20
21# Also keep - Swing UI L&F. Keep all extensions of javax.swing.plaf.ComponentUI,
22# along with the special 'createUI' method.
23-keep class * extends javax.swing.plaf.ComponentUI {
24    public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent);
25}
26
27# Keep names - Native method names. Keep all native class/method names.
28-keepclasseswithmembers,includedescriptorclasses,allowshrinking class * {
29    native <methods>;
30}
31
32# Remove - System method calls. Remove all invocations of System
33# methods without side effects whose return values are not used.
34-assumenosideeffects public class java.lang.System {
35    public static long currentTimeMillis();
36    static java.lang.Class getCallerClass();
37    public static int identityHashCode(java.lang.Object);
38    public static java.lang.SecurityManager getSecurityManager();
39    public static java.util.Properties getProperties();
40    public static java.lang.String getProperty(java.lang.String);
41    public static java.lang.String getenv(java.lang.String);
42    public static java.lang.String mapLibraryName(java.lang.String);
43    public static java.lang.String getProperty(java.lang.String,java.lang.String);
44}
45
46# Remove - Math method calls. Remove all invocations of Math
47# methods without side effects whose return values are not used.
48-assumenosideeffects public class java.lang.Math {
49    public static double sin(double);
50    public static double cos(double);
51    public static double tan(double);
52    public static double asin(double);
53    public static double acos(double);
54    public static double atan(double);
55    public static double toRadians(double);
56    public static double toDegrees(double);
57    public static double exp(double);
58    public static double log(double);
59    public static double log10(double);
60    public static double sqrt(double);
61    public static double cbrt(double);
62    public static double IEEEremainder(double,double);
63    public static double ceil(double);
64    public static double floor(double);
65    public static double rint(double);
66    public static double atan2(double,double);
67    public static double pow(double,double);
68    public static int round(float);
69    public static long round(double);
70    public static double random();
71    public static int abs(int);
72    public static long abs(long);
73    public static float abs(float);
74    public static double abs(double);
75    public static int max(int,int);
76    public static long max(long,long);
77    public static float max(float,float);
78    public static double max(double,double);
79    public static int min(int,int);
80    public static long min(long,long);
81    public static float min(float,float);
82    public static double min(double,double);
83    public static double ulp(double);
84    public static float ulp(float);
85    public static double signum(double);
86    public static float signum(float);
87    public static double sinh(double);
88    public static double cosh(double);
89    public static double tanh(double);
90    public static double hypot(double,double);
91    public static double expm1(double);
92    public static double log1p(double);
93}
94
95# Remove - Number method calls. Remove all invocations of Number
96# methods without side effects whose return values are not used.
97-assumenosideeffects public class java.lang.* extends java.lang.Number {
98    public static java.lang.String toString(byte);
99    public static java.lang.Byte valueOf(byte);
100    public static byte parseByte(java.lang.String);
101    public static byte parseByte(java.lang.String,int);
102    public static java.lang.Byte valueOf(java.lang.String,int);
103    public static java.lang.Byte valueOf(java.lang.String);
104    public static java.lang.Byte decode(java.lang.String);
105    public int compareTo(java.lang.Byte);
106    public static java.lang.String toString(short);
107    public static short parseShort(java.lang.String);
108    public static short parseShort(java.lang.String,int);
109    public static java.lang.Short valueOf(java.lang.String,int);
110    public static java.lang.Short valueOf(java.lang.String);
111    public static java.lang.Short valueOf(short);
112    public static java.lang.Short decode(java.lang.String);
113    public static short reverseBytes(short);
114    public int compareTo(java.lang.Short);
115    public static java.lang.String toString(int,int);
116    public static java.lang.String toHexString(int);
117    public static java.lang.String toOctalString(int);
118    public static java.lang.String toBinaryString(int);
119    public static java.lang.String toString(int);
120    public static int parseInt(java.lang.String,int);
121    public static int parseInt(java.lang.String);
122    public static java.lang.Integer valueOf(java.lang.String,int);
123    public static java.lang.Integer valueOf(java.lang.String);
124    public static java.lang.Integer valueOf(int);
125    public static java.lang.Integer getInteger(java.lang.String);
126    public static java.lang.Integer getInteger(java.lang.String,int);
127    public static java.lang.Integer getInteger(java.lang.String,java.lang.Integer);
128    public static java.lang.Integer decode(java.lang.String);
129    public static int highestOneBit(int);
130    public static int lowestOneBit(int);
131    public static int numberOfLeadingZeros(int);
132    public static int numberOfTrailingZeros(int);
133    public static int bitCount(int);
134    public static int rotateLeft(int,int);
135    public static int rotateRight(int,int);
136    public static int reverse(int);
137    public static int signum(int);
138    public static int reverseBytes(int);
139    public int compareTo(java.lang.Integer);
140    public static java.lang.String toString(long,int);
141    public static java.lang.String toHexString(long);
142    public static java.lang.String toOctalString(long);
143    public static java.lang.String toBinaryString(long);
144    public static java.lang.String toString(long);
145    public static long parseLong(java.lang.String,int);
146    public static long parseLong(java.lang.String);
147    public static java.lang.Long valueOf(java.lang.String,int);
148    public static java.lang.Long valueOf(java.lang.String);
149    public static java.lang.Long valueOf(long);
150    public static java.lang.Long decode(java.lang.String);
151    public static java.lang.Long getLong(java.lang.String);
152    public static java.lang.Long getLong(java.lang.String,long);
153    public static java.lang.Long getLong(java.lang.String,java.lang.Long);
154    public static long highestOneBit(long);
155    public static long lowestOneBit(long);
156    public static int numberOfLeadingZeros(long);
157    public static int numberOfTrailingZeros(long);
158    public static int bitCount(long);
159    public static long rotateLeft(long,int);
160    public static long rotateRight(long,int);
161    public static long reverse(long);
162    public static int signum(long);
163    public static long reverseBytes(long);
164    public int compareTo(java.lang.Long);
165    public static java.lang.String toString(float);
166    public static java.lang.String toHexString(float);
167    public static java.lang.Float valueOf(java.lang.String);
168    public static java.lang.Float valueOf(float);
169    public static float parseFloat(java.lang.String);
170    public static boolean isNaN(float);
171    public static boolean isInfinite(float);
172    public static int floatToIntBits(float);
173    public static int floatToRawIntBits(float);
174    public static float intBitsToFloat(int);
175    public static int compare(float,float);
176    public boolean isNaN();
177    public boolean isInfinite();
178    public int compareTo(java.lang.Float);
179    public static java.lang.String toString(double);
180    public static java.lang.String toHexString(double);
181    public static java.lang.Double valueOf(java.lang.String);
182    public static java.lang.Double valueOf(double);
183    public static double parseDouble(java.lang.String);
184    public static boolean isNaN(double);
185    public static boolean isInfinite(double);
186    public static long doubleToLongBits(double);
187    public static long doubleToRawLongBits(double);
188    public static double longBitsToDouble(long);
189    public static int compare(double,double);
190    public boolean isNaN();
191    public boolean isInfinite();
192    public int compareTo(java.lang.Double);
193    public byte byteValue();
194    public short shortValue();
195    public int intValue();
196    public long longValue();
197    public float floatValue();
198    public double doubleValue();
199    public int compareTo(java.lang.Object);
200    public boolean equals(java.lang.Object);
201    public int hashCode();
202    public java.lang.String toString();
203}
204
205# Remove - String method calls. Remove all invocations of String
206# methods without side effects whose return values are not used.
207-assumenosideeffects public class java.lang.String {
208    public static java.lang.String copyValueOf(char[]);
209    public static java.lang.String copyValueOf(char[],int,int);
210    public static java.lang.String valueOf(boolean);
211    public static java.lang.String valueOf(char);
212    public static java.lang.String valueOf(char[]);
213    public static java.lang.String valueOf(char[],int,int);
214    public static java.lang.String valueOf(double);
215    public static java.lang.String valueOf(float);
216    public static java.lang.String valueOf(int);
217    public static java.lang.String valueOf(java.lang.Object);
218    public static java.lang.String valueOf(long);
219    public boolean contentEquals(java.lang.StringBuffer);
220    public boolean endsWith(java.lang.String);
221    public boolean equalsIgnoreCase(java.lang.String);
222    public boolean equals(java.lang.Object);
223    public boolean matches(java.lang.String);
224    public boolean regionMatches(boolean,int,java.lang.String,int,int);
225    public boolean regionMatches(int,java.lang.String,int,int);
226    public boolean startsWith(java.lang.String);
227    public boolean startsWith(java.lang.String,int);
228    public byte[] getBytes();
229    public byte[] getBytes(java.lang.String);
230    public char charAt(int);
231    public char[] toCharArray();
232    public int compareToIgnoreCase(java.lang.String);
233    public int compareTo(java.lang.Object);
234    public int compareTo(java.lang.String);
235    public int hashCode();
236    public int indexOf(int);
237    public int indexOf(int,int);
238    public int indexOf(java.lang.String);
239    public int indexOf(java.lang.String,int);
240    public int lastIndexOf(int);
241    public int lastIndexOf(int,int);
242    public int lastIndexOf(java.lang.String);
243    public int lastIndexOf(java.lang.String,int);
244    public int length();
245    public java.lang.CharSequence subSequence(int,int);
246    public java.lang.String concat(java.lang.String);
247    public java.lang.String replaceAll(java.lang.String,java.lang.String);
248    public java.lang.String replace(char,char);
249    public java.lang.String replaceFirst(java.lang.String,java.lang.String);
250    public java.lang.String[] split(java.lang.String);
251    public java.lang.String[] split(java.lang.String,int);
252    public java.lang.String substring(int);
253    public java.lang.String substring(int,int);
254    public java.lang.String toLowerCase();
255    public java.lang.String toLowerCase(java.util.Locale);
256    public java.lang.String toString();
257    public java.lang.String toUpperCase();
258    public java.lang.String toUpperCase(java.util.Locale);
259    public java.lang.String trim();
260}
261
262# Remove - StringBuffer method calls. Remove all invocations of StringBuffer
263# methods without side effects whose return values are not used.
264-assumenosideeffects public class java.lang.StringBuffer {
265    public java.lang.String toString();
266    public char charAt(int);
267    public int capacity();
268    public int codePointAt(int);
269    public int codePointBefore(int);
270    public int indexOf(java.lang.String,int);
271    public int lastIndexOf(java.lang.String);
272    public int lastIndexOf(java.lang.String,int);
273    public int length();
274    public java.lang.String substring(int);
275    public java.lang.String substring(int,int);
276}
277
278# Remove - StringBuilder method calls. Remove all invocations of StringBuilder
279# methods without side effects whose return values are not used.
280-assumenosideeffects public class java.lang.StringBuilder {
281    public java.lang.String toString();
282    public char charAt(int);
283    public int capacity();
284    public int codePointAt(int);
285    public int codePointBefore(int);
286    public int indexOf(java.lang.String,int);
287    public int lastIndexOf(java.lang.String);
288    public int lastIndexOf(java.lang.String,int);
289    public int length();
290    public java.lang.String substring(int);
291    public java.lang.String substring(int,int);
292}
293