private TypePattern getTestTypePattern(ResolvedType aspectType) {
if (lazyTestTypePattern == null) {
final boolean isPerThis;
if (aspectType.getPerClause() instanceof PerFromSuper) {
PerFromSuper ps = (PerFromSuper) aspectType.getPerClause();
isPerThis = ((PerObject) ps.lookupConcretePerClause(aspectType)).isThis();
} else {
isPerThis = ((PerObject) aspectType.getPerClause()).isThis();
}
PerThisOrTargetPointcutVisitor v = new PerThisOrTargetPointcutVisitor(!isPerThis, aspectType);
lazyTestTypePattern = v.getPerTypePointcut(testPointcut);