程序包 proguard
类 Configuration
- java.lang.Object
-
- proguard.Configuration
-
public class Configuration extends java.lang.ObjectThe ProGuard configuration.- 另请参阅:
ProGuard
-
-
字段概要
字段 修饰符和类型 字段 说明 java.util.List<java.lang.String>adaptClassStringsA list of String instances specifying a filter for classes whose string constants are to be adapted, based on corresponding obfuscated class names.java.util.List<java.lang.String>adaptResourceFileContentsA list of String instances specifying a filter for files whose contents are to be adapted, based on obfuscated class names.java.util.List<java.lang.String>adaptResourceFileNamesA list of String instances specifying a filter for files whose names are to be adapted, based on corresponding obfuscated class names.booleanaddConfigurationDebuggingSpecifies whether to add logging to reflection code, providing suggestions on the ProGuard configuration.booleanallowAccessModificationSpecifies whether the access of class members can be modified.booleanandroidSpecifies whether the code should be targeted at the Android platform.java.io.FileapplyMappingAn optional input file for reading an obfuscation mapping.java.util.List<ClassSpecification>assumeNoEscapingParametersA list ofClassSpecificationinstances, whose methods are assumed not to let any reference parameters escape (including 'this').java.util.List<ClassSpecification>assumeNoExternalReturnValuesA list ofClassSpecificationinstances, whose methods are assumed not to return any external references (only parameters and new instances).java.util.List<ClassSpecification>assumeNoExternalSideEffectsA list ofClassSpecificationinstances, whose methods are assumed to have no side external effects (that is, outside of 'this').java.util.List<ClassSpecification>assumeNoSideEffectsA list ofClassSpecificationinstances, whose methods are assumed to have no side effects.java.util.List<ClassSpecification>assumeValuesA list ofClassSpecificationinstances, with fields and methods that have specified fixed primitive values.booleanbackportSpecifies whether to backporting of class files to another targetClassVersion shall be enabled.java.net.URLclassObfuscationDictionaryAn optional name of a file containing obfuscated class names.java.util.List<java.lang.String>dontCompressA list of String instances specifying a filter for files that should not be compressed in output jars.booleandontProcessKotlinMetadataSpecifies not to process Kotlin metadata.java.io.FiledumpAn optional output file for printing out the processed code in a more or less readable form.booleanenableKotlinAsserterEnables of disables the Kotlin asserter.java.io.FileextraJarFile to write extra data entries to; instead of writing them to their respective jars.java.lang.StringflattenPackageHierarchyAn optional base package if the obfuscated package hierarchy is to be flattened,nullotherwise.booleanignoreWarningsSpecifies whether to ignore any warnings.java.util.List<KeepClassSpecification>keepA list ofKeepClassSpecificationinstances, whose class names and class member names are to be kept from shrinking, optimization, and/or obfuscation.java.util.List<java.lang.String>keepAttributesA list of String instances specifying optional attributes to be kept.java.util.ListkeepDirectoriesA list of String instances specifying directories to be kept in the output directories or the output jars.booleankeepKotlinMetadataSpecifies whether to process Kotlin metadata or not.java.util.List<java.lang.String>keepPackageNamesA list of String instances specifying package names to be kept.booleankeepParameterNamesSpecifies whether method parameter names and types should be kept for methods that are not obfuscated.java.util.List<java.lang.String>keyAliasesA list of String instances specifying the names of the keys to be used when signing jars.java.util.List<java.lang.String>keyPasswordsA list of String instances specifying the passwords of the keys to be used when signing jars.java.util.List<java.lang.String>keyStorePasswordsA list of String instances specifying the passwords of the key stores to be used when signing jars.java.util.List<java.io.File>keyStoresA list of File instances specifying the key stores to be used when signing jars.longlastModifiedSpecifies the last modification time of this configuration.ClassPathlibraryJarsA list of library entries (jars, wars, ears, jmods, zips, and directories).booleanmergeInterfacesAggressivelySpecifies whether interfaces may be merged aggressively.booleanmicroEditionSpecifies whether the code should be preverified for Java Micro Edition (creating StackMap attributes) instead of for Java Standard Edition (creating StackMapTable attributes).java.lang.StringnewSourceFileAttributeAn optional replacement for all SourceFile attributes.java.util.List<java.lang.String>noteA list of String instances specifying a filter for the classes for which not to print notes, if there are noteworthy potential problems.booleanobfuscateSpecifies whether the code should be obfuscated.java.net.URLobfuscationDictionaryAn optional name of a file containing obfuscated class member names.intoptimizationPassesSpecifies the number of optimization passes.java.util.List<java.lang.String>optimizationsA list of String instances specifying the optimizations to be performed.booleanoptimizeSpecifies whether the code should be optimized.booleanoptimizeConservativelySpecifies whether conservative optimization should be appliedbooleanoverloadAggressivelySpecifies whether to apply aggressive name overloading on class members.java.net.URLpackageObfuscationDictionaryAn optional name of a file containing obfuscated package names.booleanpreverifySpecifies whether the code should be preverified.java.io.FileprintConfigurationAn optional output file for printing out the configuration that ProGuard is using (with included files and replaced variables).java.io.FileprintMappingAn optional output file for listing the obfuscation mapping.java.io.FileprintSeedsAn optional output file for listing the kept seeds.java.io.FileprintUsageAn optional output file for listing the unused classes and class members.ClassPathprogramJarsA list of input and output entries (jars, wars, ears, jmods, zips, and directories).java.lang.StringrepackageClassesAn optional base package if the obfuscated classes are to be repackaged into a single package,nullotherwise.booleanshrinkSpecifies whether the code should be shrunk.booleanskipNonPublicLibraryClassesSpecifies whether to skip non-public library classes while reading library jars.booleanskipNonPublicLibraryClassMembersSpecifies whether to skip non-public library class members while reading library classes.static java.io.FileSTD_OUTinttargetClassVersionSpecifies the version number of the output classes, or 0 if the version number can be left unchanged.booleanuseMixedCaseClassNamesSpecifies whether obfuscated packages and classes can get mixed-case names.booleanuseUniqueClassMemberNamesSpecifies whether to generate globally unique class member names.booleanverboseSpecifies whether to print verbose messages.java.util.List<java.lang.String>warnA list of String instances specifying a filter for the classes for which not to print warnings, if there are any problems.java.util.List<ClassSpecification>whyAreYouKeepingA list ofClassSpecificationinstances, for which an explanation is to be printed, why they are kept in the shrinking step.intzipAlignSpecifies the desired alignment of uncompressed data in output jars.
-
构造器概要
构造器 构造器 说明 Configuration()
-
-
-
字段详细资料
-
STD_OUT
public static final java.io.File STD_OUT
-
programJars
public ClassPath programJars
A list of input and output entries (jars, wars, ears, jmods, zips, and directories).
-
libraryJars
public ClassPath libraryJars
A list of library entries (jars, wars, ears, jmods, zips, and directories).
-
skipNonPublicLibraryClasses
public boolean skipNonPublicLibraryClasses
Specifies whether to skip non-public library classes while reading library jars.
-
skipNonPublicLibraryClassMembers
public boolean skipNonPublicLibraryClassMembers
Specifies whether to skip non-public library class members while reading library classes.
-
keepDirectories
public java.util.List keepDirectories
A list of String instances specifying directories to be kept in the output directories or the output jars. Anulllist means no directories. An empty list means all directories. The directory names may contain "**", "*", or "?" wildcards, and they may be preceded by the "!" negator.
-
dontCompress
public java.util.List<java.lang.String> dontCompress
A list of String instances specifying a filter for files that should not be compressed in output jars.
-
zipAlign
public int zipAlign
Specifies the desired alignment of uncompressed data in output jars. Uncompressed data will start at a multiple of the given number of bytes, relative to the start of the jar file.
-
targetClassVersion
public int targetClassVersion
Specifies the version number of the output classes, or 0 if the version number can be left unchanged.
-
lastModified
public long lastModified
Specifies the last modification time of this configuration. This time is necessary to check whether the input has to be processed. Setting it to Long.MAX_VALUE forces processing, even if the modification times of the output appear more recent than the modification times of the input.
-
keep
public java.util.List<KeepClassSpecification> keep
A list ofKeepClassSpecificationinstances, whose class names and class member names are to be kept from shrinking, optimization, and/or obfuscation.
-
printSeeds
public java.io.File printSeeds
An optional output file for listing the kept seeds. An empty file name means the standard output.
-
shrink
public boolean shrink
Specifies whether the code should be shrunk.
-
printUsage
public java.io.File printUsage
An optional output file for listing the unused classes and class members. An empty file name means the standard output.
-
whyAreYouKeeping
public java.util.List<ClassSpecification> whyAreYouKeeping
A list ofClassSpecificationinstances, for which an explanation is to be printed, why they are kept in the shrinking step.
-
optimize
public boolean optimize
Specifies whether the code should be optimized.
-
optimizations
public java.util.List<java.lang.String> optimizations
A list of String instances specifying the optimizations to be performed. Anulllist means all optimizations. The optimization names may contain "*" or "?" wildcards, and they may be preceded by the "!" negator.
-
optimizationPasses
public int optimizationPasses
Specifies the number of optimization passes.
-
assumeNoSideEffects
public java.util.List<ClassSpecification> assumeNoSideEffects
A list ofClassSpecificationinstances, whose methods are assumed to have no side effects.
-
assumeNoExternalSideEffects
public java.util.List<ClassSpecification> assumeNoExternalSideEffects
A list ofClassSpecificationinstances, whose methods are assumed to have no side external effects (that is, outside of 'this').
-
assumeNoEscapingParameters
public java.util.List<ClassSpecification> assumeNoEscapingParameters
A list ofClassSpecificationinstances, whose methods are assumed not to let any reference parameters escape (including 'this').
-
assumeNoExternalReturnValues
public java.util.List<ClassSpecification> assumeNoExternalReturnValues
A list ofClassSpecificationinstances, whose methods are assumed not to return any external references (only parameters and new instances).
-
assumeValues
public java.util.List<ClassSpecification> assumeValues
A list ofClassSpecificationinstances, with fields and methods that have specified fixed primitive values.
-
allowAccessModification
public boolean allowAccessModification
Specifies whether the access of class members can be modified.
-
mergeInterfacesAggressively
public boolean mergeInterfacesAggressively
Specifies whether interfaces may be merged aggressively.
-
obfuscate
public boolean obfuscate
Specifies whether the code should be obfuscated.
-
printMapping
public java.io.File printMapping
An optional output file for listing the obfuscation mapping. An empty file name means the standard output.
-
applyMapping
public java.io.File applyMapping
An optional input file for reading an obfuscation mapping.
-
obfuscationDictionary
public java.net.URL obfuscationDictionary
An optional name of a file containing obfuscated class member names.
-
classObfuscationDictionary
public java.net.URL classObfuscationDictionary
An optional name of a file containing obfuscated class names.
-
packageObfuscationDictionary
public java.net.URL packageObfuscationDictionary
An optional name of a file containing obfuscated package names.
-
overloadAggressively
public boolean overloadAggressively
Specifies whether to apply aggressive name overloading on class members.
-
useUniqueClassMemberNames
public boolean useUniqueClassMemberNames
Specifies whether to generate globally unique class member names.
-
useMixedCaseClassNames
public boolean useMixedCaseClassNames
Specifies whether obfuscated packages and classes can get mixed-case names.
-
keepPackageNames
public java.util.List<java.lang.String> keepPackageNames
A list of String instances specifying package names to be kept. Anulllist means no names. An empty list means all names. The package names may contain "**", "*", or "?" wildcards, and they may be preceded by the "!" negator.
-
flattenPackageHierarchy
public java.lang.String flattenPackageHierarchy
An optional base package if the obfuscated package hierarchy is to be flattened,nullotherwise.
-
repackageClasses
public java.lang.String repackageClasses
An optional base package if the obfuscated classes are to be repackaged into a single package,nullotherwise.
-
keepAttributes
public java.util.List<java.lang.String> keepAttributes
A list of String instances specifying optional attributes to be kept. Anulllist means no attributes. An empty list means all attributes. The attribute names may contain "*" or "?" wildcards, and they may be preceded by the "!" negator.
-
keepParameterNames
public boolean keepParameterNames
Specifies whether method parameter names and types should be kept for methods that are not obfuscated. This is achieved by keeping partial "LocalVariableTable" and "LocalVariableTypeTable" attributes.
-
newSourceFileAttribute
public java.lang.String newSourceFileAttribute
An optional replacement for all SourceFile attributes.
-
adaptClassStrings
public java.util.List<java.lang.String> adaptClassStrings
A list of String instances specifying a filter for classes whose string constants are to be adapted, based on corresponding obfuscated class names.
-
adaptResourceFileNames
public java.util.List<java.lang.String> adaptResourceFileNames
A list of String instances specifying a filter for files whose names are to be adapted, based on corresponding obfuscated class names.
-
adaptResourceFileContents
public java.util.List<java.lang.String> adaptResourceFileContents
A list of String instances specifying a filter for files whose contents are to be adapted, based on obfuscated class names.
-
preverify
public boolean preverify
Specifies whether the code should be preverified.
-
microEdition
public boolean microEdition
Specifies whether the code should be preverified for Java Micro Edition (creating StackMap attributes) instead of for Java Standard Edition (creating StackMapTable attributes).
-
android
public boolean android
Specifies whether the code should be targeted at the Android platform.
-
keyStores
public java.util.List<java.io.File> keyStores
A list of File instances specifying the key stores to be used when signing jars.
-
keyStorePasswords
public java.util.List<java.lang.String> keyStorePasswords
A list of String instances specifying the passwords of the key stores to be used when signing jars.
-
keyAliases
public java.util.List<java.lang.String> keyAliases
A list of String instances specifying the names of the keys to be used when signing jars.
-
keyPasswords
public java.util.List<java.lang.String> keyPasswords
A list of String instances specifying the passwords of the keys to be used when signing jars.
-
verbose
public boolean verbose
Specifies whether to print verbose messages.
-
note
public java.util.List<java.lang.String> note
A list of String instances specifying a filter for the classes for which not to print notes, if there are noteworthy potential problems. Anulllist means all classes. The class names may contain "**", "*", or "?" wildcards, and they may be preceded by the "!" negator.
-
warn
public java.util.List<java.lang.String> warn
A list of String instances specifying a filter for the classes for which not to print warnings, if there are any problems. Anulllist means all classes. The class names may contain "**", "*", or "?" wildcards, and they may be preceded by the "!" negator.
-
ignoreWarnings
public boolean ignoreWarnings
Specifies whether to ignore any warnings.
-
printConfiguration
public java.io.File printConfiguration
An optional output file for printing out the configuration that ProGuard is using (with included files and replaced variables). An empty file name means the standard output.
-
dump
public java.io.File dump
An optional output file for printing out the processed code in a more or less readable form. An empty file name means the standard output.
-
addConfigurationDebugging
public boolean addConfigurationDebugging
Specifies whether to add logging to reflection code, providing suggestions on the ProGuard configuration.
-
backport
public boolean backport
Specifies whether to backporting of class files to another targetClassVersion shall be enabled.
-
keepKotlinMetadata
public boolean keepKotlinMetadata
Specifies whether to process Kotlin metadata or not.
-
dontProcessKotlinMetadata
public boolean dontProcessKotlinMetadata
Specifies not to process Kotlin metadata. Overwrites KeepKotlinMetadata.
-
enableKotlinAsserter
public boolean enableKotlinAsserter
Enables of disables the Kotlin asserter. This is a hidden option, not available via the configuration file.
-
extraJar
public java.io.File extraJar
File to write extra data entries to; instead of writing them to their respective jars. SeeExtraDataEntryNameMap.
-
optimizeConservatively
public boolean optimizeConservatively
Specifies whether conservative optimization should be applied
-
-