public aspect ThisAndTargetPointcutMatching { // rule 1) you can't use generic or parameterized type patterns with this and target pointcut tryThisGeneric() : this(Generic); // CE L 4 pointcut tryTargetGeneric() : target(Generic); // CE L5 pointcut tryThisParameterized() : this(ISore); // CE L6 pointcut tryTargetParameterized() : target(ISore); // CE /7 } class Generic { T foo = null; T getFoo() { return foo; } } interface ISore { void iSee(E anE); } class UglyBuilding implements ISore { public void iSee(String s) {} }