1/* 2 * ProGuard -- shrinking, optimization, obfuscation, and preverification 3 * of Java bytecode. 4 * 5 * Copyright (c) 2002-2009 Eric Lafortune (eric@graphics.cornell.edu) 6 * 7 * This program is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License as published by the Free 9 * Software Foundation; either version 2 of the License, or (at your option) 10 * any later version. 11 * 12 * This program is distributed in the hope that it will be useful, but WITHOUT 13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 15 * more details. 16 * 17 * You should have received a copy of the GNU General Public License along 18 * with this program; if not, write to the Free Software Foundation, Inc., 19 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 */ 21package proguard; 22 23/** 24 * This class provides constants for parsing and writing ProGuard configurations. 25 * 26 * @author Eric Lafortune 27 */ 28class ConfigurationConstants 29{ 30 public static final String OPTION_PREFIX = "-"; 31 public static final String AT_DIRECTIVE = "@"; 32 public static final String INCLUDE_DIRECTIVE = "-include"; 33 public static final String BASE_DIRECTORY_DIRECTIVE = "-basedirectory"; 34 35 public static final String INJARS_OPTION = "-injars"; 36 public static final String OUTJARS_OPTION = "-outjars"; 37 public static final String LIBRARYJARS_OPTION = "-libraryjars"; 38 public static final String RESOURCEJARS_OPTION = "-resourcejars"; 39 40 public static final String KEEP_OPTION = "-keep"; 41 public static final String KEEP_CLASS_MEMBERS_OPTION = "-keepclassmembers"; 42 public static final String KEEP_CLASSES_WITH_MEMBERS_OPTION = "-keepclasseswithmembers"; 43 public static final String KEEP_NAMES_OPTION = "-keepnames"; 44 public static final String KEEP_CLASS_MEMBER_NAMES_OPTION = "-keepclassmembernames"; 45 public static final String KEEP_CLASSES_WITH_MEMBER_NAMES_OPTION = "-keepclasseswithmembernames"; 46 public static final String ALLOW_SHRINKING_SUBOPTION = "allowshrinking"; 47 public static final String ALLOW_OPTIMIZATION_SUBOPTION = "allowoptimization"; 48 public static final String ALLOW_OBFUSCATION_SUBOPTION = "allowobfuscation"; 49 public static final String PRINT_SEEDS_OPTION = "-printseeds"; 50 51 public static final String DONT_SHRINK_OPTION = "-dontshrink"; 52 public static final String PRINT_USAGE_OPTION = "-printusage"; 53 public static final String WHY_ARE_YOU_KEEPING_OPTION = "-whyareyoukeeping"; 54 55 public static final String DONT_OPTIMIZE_OPTION = "-dontoptimize"; 56 public static final String OPTIMIZATIONS = "-optimizations"; 57 public static final String OPTIMIZATION_PASSES = "-optimizationpasses"; 58 public static final String ASSUME_NO_SIDE_EFFECTS_OPTION = "-assumenosideeffects"; 59 public static final String ALLOW_ACCESS_MODIFICATION_OPTION = "-allowaccessmodification"; 60 public static final String MERGE_INTERFACES_AGGRESSIVELY_OPTION = "-mergeinterfacesaggressively"; 61 62 public static final String DONT_OBFUSCATE_OPTION = "-dontobfuscate"; 63 public static final String PRINT_MAPPING_OPTION = "-printmapping"; 64 public static final String APPLY_MAPPING_OPTION = "-applymapping"; 65 public static final String OBFUSCATION_DICTIONARY_OPTION = "-obfuscationdictionary"; 66 public static final String CLASS_OBFUSCATION_DICTIONARY_OPTION = "-classobfuscationdictionary"; 67 public static final String PACKAGE_OBFUSCATION_DICTIONARY_OPTION = "-packageobfuscationdictionary"; 68 public static final String OVERLOAD_AGGRESSIVELY_OPTION = "-overloadaggressively"; 69 public static final String USE_UNIQUE_CLASS_MEMBER_NAMES_OPTION = "-useuniqueclassmembernames"; 70 public static final String DONT_USE_MIXED_CASE_CLASS_NAMES_OPTION = "-dontusemixedcaseclassnames"; 71 public static final String KEEP_PACKAGE_NAMES_OPTION = "-keeppackagenames"; 72 public static final String FLATTEN_PACKAGE_HIERARCHY_OPTION = "-flattenpackagehierarchy"; 73 public static final String REPACKAGE_CLASSES_OPTION = "-repackageclasses"; 74 public static final String DEFAULT_PACKAGE_OPTION = "-defaultpackage"; 75 public static final String KEEP_ATTRIBUTES_OPTION = "-keepattributes"; 76 public static final String RENAME_SOURCE_FILE_ATTRIBUTE_OPTION = "-renamesourcefileattribute"; 77 public static final String ADAPT_CLASS_STRINGS_OPTION = "-adaptclassstrings"; 78 public static final String ADAPT_RESOURCE_FILE_NAMES_OPTION = "-adaptresourcefilenames"; 79 public static final String ADAPT_RESOURCE_FILE_CONTENTS_OPTION = "-adaptresourcefilecontents"; 80 81 public static final String DONT_PREVERIFY_OPTION = "-dontpreverify"; 82 public static final String MICRO_EDITION_OPTION = "-microedition"; 83 84 public static final String VERBOSE_OPTION = "-verbose"; 85 public static final String DONT_NOTE_OPTION = "-dontnote"; 86 public static final String DONT_WARN_OPTION = "-dontwarn"; 87 public static final String IGNORE_WARNINGS_OPTION = "-ignorewarnings"; 88 public static final String PRINT_CONFIGURATION_OPTION = "-printconfiguration"; 89 public static final String DUMP_OPTION = "-dump"; 90 public static final String DONT_SKIP_NON_PUBLIC_LIBRARY_CLASSES_OPTION = "-dontskipnonpubliclibraryclasses"; 91 public static final String DONT_SKIP_NON_PUBLIC_LIBRARY_CLASS_MEMBERS_OPTION = "-dontskipnonpubliclibraryclassmembers"; 92 public static final String TARGET_OPTION = "-target"; 93 public static final String KEEP_DIRECTORIES_OPTION = "-keepdirectories"; 94 public static final String FORCE_PROCESSING_OPTION = "-forceprocessing"; 95 96 public static final String ANY_ATTRIBUTE_KEYWORD = "*"; 97 public static final String ATTRIBUTE_SEPARATOR_KEYWORD = ","; 98 99 public static final String JAR_SEPARATOR_KEYWORD = System.getProperty("path.separator"); 100 101 public static final char OPEN_SYSTEM_PROPERTY = '<'; 102 public static final char CLOSE_SYSTEM_PROPERTY = '>'; 103 104 public static final String ANNOTATION_KEYWORD = "@"; 105 public static final String NEGATOR_KEYWORD = "!"; 106 public static final String CLASS_KEYWORD = "class"; 107 public static final String ANY_CLASS_KEYWORD = "*"; 108 public static final String ANY_TYPE_KEYWORD = "***"; 109 public static final String IMPLEMENTS_KEYWORD = "implements"; 110 public static final String EXTENDS_KEYWORD = "extends"; 111 public static final String OPEN_KEYWORD = "{"; 112 public static final String ANY_CLASS_MEMBER_KEYWORD = "*"; 113 public static final String ANY_FIELD_KEYWORD = "<fields>"; 114 public static final String ANY_METHOD_KEYWORD = "<methods>"; 115 public static final String OPEN_ARGUMENTS_KEYWORD = "("; 116 public static final String ARGUMENT_SEPARATOR_KEYWORD = ","; 117 public static final String ANY_ARGUMENTS_KEYWORD = "..."; 118 public static final String CLOSE_ARGUMENTS_KEYWORD = ")"; 119 public static final String SEPARATOR_KEYWORD = ";"; 120 public static final String CLOSE_KEYWORD = "}"; 121} 122