1 25 package net.sf.javaguard; 26 27 28 31 public interface ScriptConstants { 32 33 public static final String DIRECTIVE_ATTRIBUTE = ".attribute"; 34 35 public static final int TYPE_ATTRIBUTE = 0; 36 37 38 public static final String DIRECTIVE_RENAME = ".rename"; 39 40 public static final int TYPE_RENAME = 1; 41 42 43 public static final String DIRECTIVE_PRESERVE = ".preserve"; 44 45 public static final int TYPE_PRESERVE = 2; 46 47 48 49 50 public static final String DIRECTIVE_PACKAGE = ".package"; 51 52 public static final int TYPE_PACKAGE = 10; 53 54 55 public static final String DIRECTIVE_PACKAGE_MAP = ".package_map"; 56 57 public static final int TYPE_PACKAGE_MAP = 11; 58 59 60 61 public static final String DIRECTIVE_CLASS = ".class"; 62 63 public static final int TYPE_CLASS = 20; 64 65 66 public static final String DIRECTIVE_CLASS_MAP = ".class_map"; 67 68 public static final int TYPE_CLASS_MAP = 21; 69 70 71 72 public static final String DIRECTIVE_METHOD = ".method"; 73 74 public static final int TYPE_METHOD = 30; 75 76 77 public static final String DIRECTIVE_METHOD_MAP = ".method_map"; 78 79 public static final int TYPE_METHOD_MAP = 31; 80 81 82 83 public static final String DIRECTIVE_FIELD = ".field"; 84 85 public static final int TYPE_FIELD = 40; 86 87 88 public static final String DIRECTIVE_FIELD_MAP = ".field_map"; 89 90 public static final int TYPE_FIELD_MAP = 41; 91 92 93 94 public static final String DIRECTIVE_IGNORE = ".ignore"; 95 96 public static final int TYPE_IGNORE = 50; 97 98 99 public static final String DIRECTIVE_IGNORE_PACKAGE = ".ignore_package"; 100 101 public static final int TYPE_IGNORE_PACKAGE = 51; 102 103 104 public static final String DIRECTIVE_IGNORE_CLASS = ".ignore_class"; 105 106 public static final int TYPE_IGNORE_CLASS = 52; 107 108 109 public static final String DIRECTIVE_IGNORE_METHOD = ".ignore_method"; 110 111 public static final int TYPE_IGNORE_METHOD = 53; 112 113 114 public static final String DIRECTIVE_IGNORE_FIELD = ".ignore_field"; 115 116 public static final int TYPE_IGNORE_FIELD = 54; 117 118 119 120 public static final String DIRECTIVE_OBFUSCATE = ".obfuscate"; 121 122 public static final int TYPE_OBFUSCATE = 60; 123 124 125 public static final String DIRECTIVE_OBFUSCATE_PACKAGE = ".obfuscate_package"; 126 127 public static final int TYPE_OBFUSCATE_PACKAGE = 61; 128 129 130 public static final String DIRECTIVE_OBFUSCATE_CLASS = ".obfuscate_class"; 131 132 public static final int TYPE_OBFUSCATE_CLASS = 62; 133 134 135 public static final String DIRECTIVE_OBFUSCATE_METHOD = ".obfuscate_method"; 136 137 public static final int TYPE_OBFUSCATE_METHOD = 63; 138 139 140 public static final String DIRECTIVE_OBFUSCATE_FIELD = ".obfuscate_field"; 141 142 public static final int TYPE_OBFUSCATE_FIELD = 64; 143 144 145 146 public static final String [] directives = { 147 DIRECTIVE_ATTRIBUTE, 148 DIRECTIVE_RENAME, 149 DIRECTIVE_PRESERVE, 150 DIRECTIVE_PACKAGE, 151 DIRECTIVE_PACKAGE_MAP, 152 DIRECTIVE_CLASS, 153 DIRECTIVE_CLASS_MAP, 154 DIRECTIVE_METHOD, 155 DIRECTIVE_METHOD_MAP, 156 DIRECTIVE_FIELD, 157 DIRECTIVE_FIELD_MAP, 158 DIRECTIVE_IGNORE, 159 DIRECTIVE_IGNORE_PACKAGE, 160 DIRECTIVE_IGNORE_CLASS, 161 DIRECTIVE_IGNORE_METHOD, 162 DIRECTIVE_IGNORE_FIELD, 163 DIRECTIVE_OBFUSCATE, 164 DIRECTIVE_OBFUSCATE_PACKAGE, 165 DIRECTIVE_OBFUSCATE_CLASS, 166 DIRECTIVE_OBFUSCATE_METHOD, 167 DIRECTIVE_OBFUSCATE_FIELD 168 }; 169 170 171 174 public static final int[] directiveTypes = { 175 TYPE_ATTRIBUTE, 176 TYPE_RENAME, 177 TYPE_PRESERVE, 178 TYPE_PACKAGE, 179 TYPE_PACKAGE_MAP, 180 TYPE_CLASS, 181 TYPE_CLASS_MAP, 182 TYPE_METHOD, 183 TYPE_METHOD_MAP, 184 TYPE_FIELD, 185 TYPE_FIELD_MAP, 186 TYPE_IGNORE, 187 TYPE_IGNORE_PACKAGE, 188 TYPE_IGNORE_CLASS, 189 TYPE_IGNORE_METHOD, 190 TYPE_IGNORE_FIELD, 191 TYPE_OBFUSCATE, 192 TYPE_OBFUSCATE_PACKAGE, 193 TYPE_OBFUSCATE_CLASS, 194 TYPE_OBFUSCATE_METHOD, 195 TYPE_OBFUSCATE_FIELD, 196 }; 197 198 199 200 201 204 public static final String OPTION_PUBLIC = "public"; 205 206 public static final int OPTION_TYPE_PUBLIC = 1000; 207 208 211 public static final String OPTION_PROTECTED = "protected"; 212 213 public static final int OPTION_TYPE_PROTECTED = 1001; 214 215 218 public static final String OPTION_METHOD = "method"; 219 220 public static final int OPTION_TYPE_METHOD = 1002; 221 222 225 public static final String OPTION_FIELD = "field"; 226 227 public static final int OPTION_TYPE_FIELD = 1003; 228 229 230 231 232 235 public static final String [] options = { 236 OPTION_PUBLIC, 237 OPTION_PROTECTED, 238 OPTION_METHOD, 239 OPTION_FIELD 240 }; 241 242 243 246 public static final int[] optionTypes = { 247 OPTION_TYPE_PUBLIC, 248 OPTION_TYPE_PROTECTED, 249 OPTION_TYPE_METHOD, 250 OPTION_TYPE_FIELD 251 }; 252 253 254 255 256 258 259 public static final String ATTR_Unknown = "Unknown"; 260 261 public static final String ATTR_Code = "Code"; 262 263 public static final String ATTR_ConstantValue = "ConstantValue"; 264 265 public static final String ATTR_Exceptions = "Exceptions"; 266 267 public static final String ATTR_LineNumberTable = "LineNumberTable"; 268 269 public static final String ATTR_SourceFile = "SourceFile"; 270 271 public static final String ATTR_LocalVariableTable = "LocalVariableTable"; 272 273 public static final String ATTR_InnerClasses = "InnerClasses"; 274 275 public static final String ATTR_Synthetic = "Synthetic"; 276 277 278 281 public static String [] validAttrs = { 282 ATTR_Unknown, 283 ATTR_Code, 284 ATTR_ConstantValue, 285 ATTR_Exceptions, 286 ATTR_LineNumberTable, 287 ATTR_SourceFile, 288 ATTR_LocalVariableTable, 289 ATTR_InnerClasses, 290 ATTR_Synthetic 291 }; 292 293 294 295 296 299 public static final String RENAME_RMIC = "rmic"; 300 303 public static final String RENAME_RESOURCES = "resources"; 304 305 306 309 public static String [] renameAttrs = { 310 RENAME_RMIC, 311 RENAME_RESOURCES 312 }; 313 314 315 316 317 320 public static final String PRESERVE_REFERENCES = "hardcodedreferences"; 321 322 325 public static String [] preserveAttrs = { 326 PRESERVE_REFERENCES 327 }; 328 } 329 | Popular Tags |