protected FuzzyBoolean matchInternal(Shadow shadow) { ResolvedType enclosingType = shadow.getIWorld().resolve(shadow.getEnclosingType(), true); if (enclosingType.isMissing()) { shadow.getIWorld().getLint().cantFindType.signal(new String[] { WeaverMessages.format( WeaverMessages.CANT_FIND_TYPE_WITHINPCD, shadow.getEnclosingType().getName()) }, shadow.getSourceLocation(), new ISourceLocation[] { getSourceLocation() }); } typePattern.resolve(shadow.getIWorld()); return isWithinType(enclosingType); }
return shadow.getKind().getName(); } else if (key.equalsIgnoreCase("joinpoint.enclosingclass")) { return shadow.getEnclosingType().getName(); } else if (key.equalsIgnoreCase("joinpoint.enclosingmember.name")) { Member member = shadow.getEnclosingCodeSignature();
@Override protected FuzzyBoolean matchInternal(Shadow shadow) { ResolvedType enclosingType = shadow.getIWorld().resolve(shadow.getEnclosingType(), true); if (enclosingType.isMissing()) { shadow.getIWorld().getLint().cantFindType.signal(new String[] { WeaverMessages.format( WeaverMessages.CANT_FIND_TYPE_WITHINPCD, shadow.getEnclosingType().getName()) }, shadow.getSourceLocation(), new ISourceLocation[] { getSourceLocation() }); // IMessage msg = new Message( // WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_WITHINPCD, // shadow.getEnclosingType().getName()), // shadow.getSourceLocation(),true,new ISourceLocation[]{getSourceLocation()}); // shadow.getIWorld().getMessageHandler().handleMessage(msg); } annotationTypePattern.resolve(shadow.getIWorld()); return annotationTypePattern.matches(enclosingType); }
Expr myInstance = Expr.makeCallExpr(AjcMemberMaker.perTypeWithinLocalAspectOf(shadow.getEnclosingType(), inAspect/*
ResolvedType type = shadow.getEnclosingType().resolve(world); if (excludedTypes != null && excludedTypes.contains(type)) { return false;
enclosingNode = lookupMember(model.getHierarchy(), shadow.getEnclosingType(), enclosingMember); } else { UnresolvedType type = enclosingMember.getDeclaringType(); enclosingNode = lookupMember(model.getHierarchy(), shadow.getEnclosingType(), enclosingMember); } else { enclosingNode = lookupMember(model.getHierarchy(), shadow.getEnclosingType(), actualEnclosingMember); enclosingNode = lookupMember(model.getHierarchy(), shadow.getEnclosingType(), enclosingMember);
String advisedType = shadow.getEnclosingType().getName(); String advisingType = advice.getConcreteAspect().getName(); Message msg = null;
@Override protected FuzzyBoolean matchInternal(Shadow shadow) { ResolvedType enclosingType = shadow.getIWorld().resolve(shadow.getEnclosingType(), true); if (enclosingType.isMissing()) { // PTWIMPL ?? Add a proper message IMessage msg = new Message("Cant find type pertypewithin matching...", shadow.getSourceLocation(), true, new ISourceLocation[] { getSourceLocation() }); shadow.getIWorld().getMessageHandler().handleMessage(msg); } // See pr106554 - we can't put advice calls in an interface when the // advice is defined // in a pertypewithin aspect - the JPs only exist in the static // initializer and can't // call the localAspectOf() method. if (enclosingType.isInterface()) { return FuzzyBoolean.NO; } if (!(enclosingType.canBeSeenBy(inAspect) || inAspect.isPrivilegedAspect())) { return FuzzyBoolean.NO; } typePattern.resolve(shadow.getIWorld()); return isWithinType(enclosingType); }
if (world.resolve(shadow.getEnclosingType()).isGroovyObject()) { return false; return false; } else if (shadow.getKind() == Shadow.StaticInitialization && shadow.getEnclosingType().resolve(world).isInterface()) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.AROUND_ON_INTERFACE_STATICINIT, shadow .getEnclosingType().getName()), getSourceLocation(), shadow.getSourceLocation()); return false; } else {