org.apache.ivy.core.event
Class IvyEventFilter
java.lang.Object
org.apache.ivy.core.event.IvyEventFilter
- All Implemented Interfaces:
- Filter
public class IvyEventFilter
- extends java.lang.Object
- implements Filter
A filter implementation filtering IvyEvent
based upon an event name and a filter
expression. The name will be matched against the event name using the PatternMatcher
used
to construct this object. The filter expression is a string describing how the event should be
filtered according to its attributes values. The matching between the filter values and the event
attribute values is done using the PatternMatcher
used to construct this object. Here are
some examples:
expression |
effect |
type=zip |
accepts event with a type attribute matching zip |
type=zip,jar |
accepts event with a type attribute matching zip or jar |
type=src AND ext=zip |
accepts event with a type attribute matching src AND an ext attribute matching zip |
type=src OR ext=zip |
accepts event with a type attribute matching src OR an ext attribute matching zip |
NOT type=src |
accepts event with a type attribute NOT matching src |
Combination of these can be used, but no parentheses are supported right now, so only
the default priority can be used. The priority order is this one: AND OR NOT = This means that
artifact=foo AND ext=zip OR type=src will match event with artifact matching foo AND (ext
matching zip OR type matching src)
- Since:
- 1.4
Method Summary |
boolean |
accept(java.lang.Object o)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IvyEventFilter
public IvyEventFilter(java.lang.String event,
java.lang.String filterExpression,
PatternMatcher matcher)
accept
public boolean accept(java.lang.Object o)
- Specified by:
accept
in interface Filter