01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.config;
05:
06: import EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArrayList;
07:
08: import com.tc.aspectwerkz.reflect.ClassInfo;
09:
10: import java.util.Collection;
11: import java.util.Iterator;
12:
13: public class CompoundExpressionMatcher implements
14: ClassExpressionMatcher {
15:
16: private final Collection matchers = new CopyOnWriteArrayList();
17:
18: public boolean match(ClassInfo classInfo) {
19: for (Iterator i = matchers.iterator(); i.hasNext();) {
20: if (((ClassExpressionMatcher) i.next()).match(classInfo)) {
21: return true;
22: }
23: }
24: return false;
25: }
26:
27: public void add(ClassExpressionMatcher matcher) {
28: matchers.add(matcher);
29: }
30:
31: }
|