1 27 package ch.ethz.prose.filter; 28 29 import java.util.List ; 31 import java.util.Vector ; 32 33 import ch.ethz.jvmai.JoinPoint; 34 import ch.ethz.jvmai.CodeJoinPoint; 35 import ch.ethz.prose.engine.JoinPointRequest; 36 37 44 45 class ORingPointCutter extends PointCutter { 46 47 PointCutter spec1; 48 PointCutter spec2; 49 50 53 protected ORingPointCutter(PointCutter spec1, PointCutter spec2) 54 { 55 if (spec1 == null || spec2 == null) 56 throw new IllegalArgumentException ("Null Pointer argument in ANDPointCutter.<init>"); 57 58 this.acceptMask = spec1.acceptMask | spec2.acceptMask; 59 mayFilterStaticallyMask = spec1.mayFilterStaticallyMask | spec2.mayFilterStaticallyMask; 60 canFilterStaticallyMask = spec1.canFilterStaticallyMask & spec2.canFilterStaticallyMask; 61 62 this.spec1=spec1; 63 this.spec2=spec2; 64 } 65 66 67 68 public List memberPointFilters() 69 { 70 Vector result = new Vector (); 71 result.add(spec1); 72 result.add(spec2); 73 return result; 74 } 75 76 82 protected boolean doIsSpecialRequest(JoinPointRequest r1) 83 { 84 85 return 91 (spec1.isSpecialRequest(r1)) 92 || 93 (spec2.isSpecialRequest(r1)); 94 } 95 96 103 protected boolean doIsSpecialEvent(CodeJoinPoint e1) 104 { 105 return 115 (spec1.isSpecialEvent(e1)) 116 || 117 (spec2.isSpecialEvent(e1)); 118 119 } 120 121 public String toString() 122 { 123 return "(" + spec1.toString() + ") OR (" + spec2.toString() + ")"; 124 } 125 126 127 } 128 129 130 131 132 | Popular Tags |