public static class JarBuilder.DuplicatePolicy
extends java.lang.Object
implements com.google.common.base.Predicate<java.lang.CharSequence>
| Constructor and Description |
|---|
DuplicatePolicy(com.google.common.base.Predicate<java.lang.CharSequence> selector,
JarBuilder.DuplicateAction action)
Creates a policy that will be applied to duplicate entries matching the given
selector. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(java.lang.CharSequence jarPath) |
JarBuilder.DuplicateAction |
getAction() |
static JarBuilder.DuplicatePolicy |
pathMatches(java.lang.String regex,
JarBuilder.DuplicateAction action)
Creates a policy that applies to entries based on a path match.
|
java.lang.String |
toString() |
public DuplicatePolicy(com.google.common.base.Predicate<java.lang.CharSequence> selector,
JarBuilder.DuplicateAction action)
selector.selector - A predicate that selects entries this policy has jurisdiction over.action - The action to apply to entries selected by this policy.public static JarBuilder.DuplicatePolicy pathMatches(java.lang.String regex, JarBuilder.DuplicateAction action)
regex - A regular expression to match entry paths against.action - The action to apply to duplicate entries with path matching regex.public JarBuilder.DuplicateAction getAction()
public boolean apply(java.lang.CharSequence jarPath)
apply in interface com.google.common.base.Predicate<java.lang.CharSequence>public java.lang.String toString()
toString in class java.lang.Object