Class AlignmentRules
- java.lang.Object
-
- com.android.tools.build.apkzlib.zip.AlignmentRules
-
public final class AlignmentRules extends java.lang.ObjectFactory for instances ofAlignmentRule.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AlignmentRulecompose(AlignmentRule... rules)A rule that applies other rules in order.static AlignmentRuleconstant(int alignment)A rule that defines a constant alignment for all files.static AlignmentRuleconstantForSuffix(java.lang.String suffix, int alignment)A rule that defines constant alignment for all files with a certain suffix, placing no restrictions on other files.
-
-
-
Method Detail
-
constant
public static AlignmentRule constant(int alignment)
A rule that defines a constant alignment for all files.- Parameters:
alignment- the alignment- Returns:
- the rule
-
constantForSuffix
public static AlignmentRule constantForSuffix(java.lang.String suffix, int alignment)
A rule that defines constant alignment for all files with a certain suffix, placing no restrictions on other files.- Parameters:
suffix- the suffixalignment- the alignment for paths that match the provided suffix- Returns:
- the rule
-
compose
public static AlignmentRule compose(AlignmentRule... rules)
A rule that applies other rules in order.- Parameters:
rules- all rules to be tried; the first rule that does not returnAlignmentRule.NO_ALIGNMENTwill define the alignment for a path; if there are no rules that return a value different fromAlignmentRule.NO_ALIGNMENT, thenAlignmentRule.NO_ALIGNMENTis returned- Returns:
- the composition rule
-
-