java.lang.Object
kala.compress.harmony.pack200.PackingOptions
Manages the various options available for pack200.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate intprivate static final org.objectweb.asm.Attribute[]static final Stringprivate booleanstatic final Stringprivate booleanprivate Stringprivate Stringstatic final Stringstatic final longprivate longstatic final Stringprivate booleanprivate Stringprivate org.objectweb.asm.Attribute[]private boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClassAttributeAction(String attributeName, String action) voidaddCodeAttributeAction(String attributeName, String action) voidaddFieldAttributeAction(String attributeName, String action) voidaddMethodAttributeAction(String attributeName, String action) private voidaddOrUpdateAttributeActions(List<org.objectweb.asm.Attribute> prototypes, Map<String, String> attributeActions, int tag) voidaddPassFile(String passFileName) Tell the compressor to pass the file with the given name, or if the name is a directory name all files under that directory will be passed.intprivate Stringlongorg.objectweb.asm.Attribute[]booleanisGzip()booleanbooleanbooleanisPassFile(String passFileName) booleanbooleanvoidremovePassFile(String passFileName) voidsetDeflateHint(String deflateHint) voidsetEffort(int effort) Sets the compression effort level (0-9, equivalent to -E command line option)voidsetGzip(boolean gzip) voidsetKeepFileOrder(boolean keepFileOrder) voidsetLogFile(String logFile) voidsetModificationTime(String modificationTime) voidsetQuiet(boolean quiet) voidsetSegmentLimit(long segmentLimit) Sets the segment limit (equivalent to -S command line option)voidsetStripDebug(boolean stripDebug) Sets strip debug attributes.voidsetUnknownAttributeAction(String unknownAttributeAction) Sets the compressor behavior when an unknown attribute is encountered.voidsetVerbose(boolean verbose)
-
Field Details
-
EMPTY_ATTRIBUTE_ARRAY
private static final org.objectweb.asm.Attribute[] EMPTY_ATTRIBUTE_ARRAY -
SEGMENT_LIMIT
public static final long SEGMENT_LIMIT- See Also:
-
STRIP
- See Also:
-
ERROR
- See Also:
-
PASS
- See Also:
-
KEEP
- See Also:
-
gzip
private boolean gzip -
stripDebug
private boolean stripDebug -
keepFileOrder
private boolean keepFileOrder -
segmentLimit
private long segmentLimit -
effort
private int effort -
deflateHint
-
modificationTime
-
passFiles
-
unknownAttributeAction
-
classAttributeActions
-
fieldAttributeActions
-
methodAttributeActions
-
codeAttributeActions
-
verbose
private boolean verbose -
logFile
-
unknownAttributeTypes
private org.objectweb.asm.Attribute[] unknownAttributeTypes
-
-
Constructor Details
-
PackingOptions
public PackingOptions()
-
-
Method Details
-
addClassAttributeAction
-
addCodeAttributeAction
-
addFieldAttributeAction
-
addMethodAttributeAction
-
addOrUpdateAttributeActions
-
addPassFile
Tell the compressor to pass the file with the given name, or if the name is a directory name all files under that directory will be passed.- Parameters:
passFileName- the file name
-
getDeflateHint
-
getEffort
public int getEffort() -
getLogFile
-
getModificationTime
-
getOrDefault
-
getSegmentLimit
public long getSegmentLimit() -
getUnknownAttributeAction
-
getUnknownAttributePrototypes
public org.objectweb.asm.Attribute[] getUnknownAttributePrototypes() -
getUnknownClassAttributeAction
-
getUnknownCodeAttributeAction
-
getUnknownFieldAttributeAction
-
getUnknownMethodAttributeAction
-
isGzip
public boolean isGzip() -
isKeepDeflateHint
public boolean isKeepDeflateHint() -
isKeepFileOrder
public boolean isKeepFileOrder() -
isPassFile
-
isStripDebug
public boolean isStripDebug() -
isVerbose
public boolean isVerbose() -
removePassFile
-
setDeflateHint
-
setEffort
public void setEffort(int effort) Sets the compression effort level (0-9, equivalent to -E command line option)- Parameters:
effort- the compression effort level, 0-9.
-
setGzip
public void setGzip(boolean gzip) -
setKeepFileOrder
public void setKeepFileOrder(boolean keepFileOrder) -
setLogFile
-
setModificationTime
-
setQuiet
public void setQuiet(boolean quiet) -
setSegmentLimit
public void setSegmentLimit(long segmentLimit) Sets the segment limit (equivalent to -S command line option)- Parameters:
segmentLimit- the limit in bytes
-
setStripDebug
public void setStripDebug(boolean stripDebug) Sets strip debug attributes. If true, all debug attributes (i.e. LineNumberTable, SourceFile, LocalVariableTable and LocalVariableTypeTable attributes) are stripped when reading the input class files and not included in the output archive.- Parameters:
stripDebug- If true, all debug attributes.
-
setUnknownAttributeAction
Sets the compressor behavior when an unknown attribute is encountered.- Parameters:
unknownAttributeAction- the action to perform
-
setVerbose
public void setVerbose(boolean verbose)
-