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,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 <init>(byte); 194 public <init>(short); 195 public <init>(int); 196 public <init>(long); 197 public <init>(float); 198 public <init>(double); 199 public <init>(java.lang.String); 200 public byte byteValue(); 201 public short shortValue(); 202 public int intValue(); 203 public long longValue(); 204 public float floatValue(); 205 public double doubleValue(); 206 public int compareTo(java.lang.Object); 207 public boolean equals(java.lang.Object); 208 public int hashCode(); 209 public java.lang.String toString(); 210 } 211 212 # Remove - String method calls. Remove all invocations of String 213 # methods without side effects whose return values are not used. 214 -assumenosideeffects public class java.lang.String { 215 public <init>(); 216 public <init>(byte[]); 217 public <init>(byte[],int); 218 public <init>(byte[],int,int); 219 public <init>(byte[],int,int,int); 220 public <init>(byte[],int,int,java.lang.String); 221 public <init>(byte[],java.lang.String); 222 public <init>(char[]); 223 public <init>(char[],int,int); 224 public <init>(java.lang.String); 225 public <init>(java.lang.StringBuffer); 226 public static java.lang.String copyValueOf(char[]); 227 public static java.lang.String copyValueOf(char[],int,int); 228 public static java.lang.String valueOf(boolean); 229 public static java.lang.String valueOf(char); 230 public static java.lang.String valueOf(char[]); 231 public static java.lang.String valueOf(char[],int,int); 232 public static java.lang.String valueOf(double); 233 public static java.lang.String valueOf(float); 234 public static java.lang.String valueOf(int); 235 public static java.lang.String valueOf(java.lang.Object); 236 public static java.lang.String valueOf(long); 237 public boolean contentEquals(java.lang.StringBuffer); 238 public boolean endsWith(java.lang.String); 239 public boolean equalsIgnoreCase(java.lang.String); 240 public boolean equals(java.lang.Object); 241 public boolean matches(java.lang.String); 242 public boolean regionMatches(boolean,int,java.lang.String,int,int); 243 public boolean regionMatches(int,java.lang.String,int,int); 244 public boolean startsWith(java.lang.String); 245 public boolean startsWith(java.lang.String,int); 246 public byte[] getBytes(); 247 public byte[] getBytes(java.lang.String); 248 public char charAt(int); 249 public char[] toCharArray(); 250 public int compareToIgnoreCase(java.lang.String); 251 public int compareTo(java.lang.Object); 252 public int compareTo(java.lang.String); 253 public int hashCode(); 254 public int indexOf(int); 255 public int indexOf(int,int); 256 public int indexOf(java.lang.String); 257 public int indexOf(java.lang.String,int); 258 public int lastIndexOf(int); 259 public int lastIndexOf(int,int); 260 public int lastIndexOf(java.lang.String); 261 public int lastIndexOf(java.lang.String,int); 262 public int length(); 263 public java.lang.CharSequence subSequence(int,int); 264 public java.lang.String concat(java.lang.String); 265 public java.lang.String replaceAll(java.lang.String,java.lang.String); 266 public java.lang.String replace(char,char); 267 public java.lang.String replaceFirst(java.lang.String,java.lang.String); 268 public java.lang.String[] split(java.lang.String); 269 public java.lang.String[] split(java.lang.String,int); 270 public java.lang.String substring(int); 271 public java.lang.String substring(int,int); 272 public java.lang.String toLowerCase(); 273 public java.lang.String toLowerCase(java.util.Locale); 274 public java.lang.String toString(); 275 public java.lang.String toUpperCase(); 276 public java.lang.String toUpperCase(java.util.Locale); 277 public java.lang.String trim(); 278 } 279 280 # Remove - StringBuffer method calls. Remove all invocations of StringBuffer 281 # methods without side effects whose return values are not used. 282 -assumenosideeffects public class java.lang.StringBuffer { 283 public <init>(); 284 public <init>(int); 285 public <init>(java.lang.String); 286 public <init>(java.lang.CharSequence); 287 public java.lang.String toString(); 288 public char charAt(int); 289 public int capacity(); 290 public int codePointAt(int); 291 public int codePointBefore(int); 292 public int indexOf(java.lang.String,int); 293 public int lastIndexOf(java.lang.String); 294 public int lastIndexOf(java.lang.String,int); 295 public int length(); 296 public java.lang.String substring(int); 297 public java.lang.String substring(int,int); 298 } 299 300 # Remove - StringBuilder method calls. Remove all invocations of StringBuilder 301 # methods without side effects whose return values are not used. 302 -assumenosideeffects public class java.lang.StringBuilder { 303 public <init>(); 304 public <init>(int); 305 public <init>(java.lang.String); 306 public <init>(java.lang.CharSequence); 307 public java.lang.String toString(); 308 public char charAt(int); 309 public int capacity(); 310 public int codePointAt(int); 311 public int codePointBefore(int); 312 public int indexOf(java.lang.String,int); 313 public int lastIndexOf(java.lang.String); 314 public int lastIndexOf(java.lang.String,int); 315 public int length(); 316 public java.lang.String substring(int); 317 public java.lang.String substring(int,int); 318 } 319