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 47 public 48 class NegatingPointCutter extends PointCutter { 49 50 PointCutter spec1; 51 52 55 public NegatingPointCutter(PointCutter s1) 56 { 57 if (s1 == null) 58 throw new IllegalArgumentException ("NegatingPointCutter.<init>: s1 is null"); 59 60 this.acceptMask = s1.acceptMask; 61 this.mayFilterStaticallyMask=s1.mayFilterStaticallyMask; 62 this.canFilterStaticallyMask=s1.canFilterStaticallyMask; 63 spec1=s1; 64 } 65 66 67 public List memberPointFilters() 68 { 69 Vector result = new Vector (); 70 result.add(spec1); 71 return result; 72 } 73 74 81 protected boolean doIsSpecialRequest(JoinPointRequest r1) 82 { 83 return !spec1.isSpecialRequest(r1); 86 } 87 88 95 protected boolean doIsSpecialEvent(CodeJoinPoint e1) 96 { 97 return !spec1.isSpecialEvent(e1); 101 } 102 103 public String toString() 104 { 105 return "(!" + spec1.toString() +")"; 106 } 107 108 } 109 110 111 | Popular Tags |