}
}
}
this.active = active;
if (filter.getValue() instanceof WeldFilter) {
WeldFilter weldFilter = (WeldFilter) filter.getValue();
if ((weldFilter.getName() != null && weldFilter.getPattern() != null)
|| (weldFilter.getName() == null && weldFilter.getPattern() == null)) {
throw new IllegalStateException("Cannot specify both a pattern and a name at " + filter);
}
if (weldFilter.getPattern() != null) {
this.matcher = new PatternMatcher(filter, weldFilter.getPattern());
} else {
this.matcher = new AntSelectorMatcher(weldFilter.getName());
}
} else {
if (filter.getValue().getName() == null) {
throw new IllegalStateException("Name must be specified at " + filter);
}