} else if (a instanceof AjAttribute.DeclareAttribute) {
declares.add(((AjAttribute.DeclareAttribute) a).getDeclare());
} else if (a instanceof AjAttribute.PrivilegedAttribute) {
- privilegedAccess = ((AjAttribute.PrivilegedAttribute) a).getAccessedMembers();
+ AjAttribute.PrivilegedAttribute privAttribute = (AjAttribute.PrivilegedAttribute) a;
+ privilegedAccess = privAttribute.getAccessedMembers();
} else if (a instanceof AjAttribute.SourceContextAttribute) {
if (getResolvedTypeX().getSourceContext() instanceof SourceContextImpl) {
AjAttribute.SourceContextAttribute sca = (AjAttribute.SourceContextAttribute) a;
public void setExposedToWeaver(boolean b) {
exposedToWeaver = b;
}
+
+ @Override
+ public int getCompilerVersion() {
+ return wvInfo.getMajorVersion();
+ }
}
import org.aspectj.weaver.WeaverMessages;
import org.aspectj.weaver.WeaverStateInfo;
import org.aspectj.weaver.World;
+import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
import org.aspectj.weaver.model.AsmRelationshipProvider;
import org.aspectj.weaver.patterns.DeclareAnnotation;
import org.aspectj.weaver.patterns.Pointcut;
if (onType.equals(gen.getType())) {
if (member.getKind() == Member.FIELD) {
// System.out.println("matched: " + gen);
- addFieldGetter(gen, member, AjcMemberMaker.privilegedAccessMethodForFieldGet(aspectType, member));
- addFieldSetter(gen, member, AjcMemberMaker.privilegedAccessMethodForFieldSet(aspectType, member));
+ addFieldGetter(gen, member, AjcMemberMaker
+ .privilegedAccessMethodForFieldGet(aspectType, member, munger.shortSyntax));
+ addFieldSetter(gen, member, AjcMemberMaker
+ .privilegedAccessMethodForFieldSet(aspectType, member, munger.shortSyntax));
return true;
} else if (member.getKind() == Member.METHOD) {
addMethodDispatch(gen, member, AjcMemberMaker.privilegedAccessMethodForMethod(aspectType, member));
gen.addMethodGen(mg1);
} else {
weaver.addInitializer(this);
- FieldGen fg = makeFieldGen(gen, AjcMemberMaker.interFieldClassField(field, aspectType));
+ ResolvedMember newField = AjcMemberMaker.interFieldClassField(field, aspectType,
+ munger.version == NewFieldTypeMunger.VersionTwo);
+ FieldGen fg = makeFieldGen(gen, newField);
if (annotationsOnRealMember != null) {
for (int i = 0; i < annotationsOnRealMember.length; i++) {
didSomething = true;
ResolvedTypeMunger newAnnotationTM = new AnnotationOnTypeMunger(annoX);
newAnnotationTM.setSourceLocation(decA.getSourceLocation());
- onType.addInterTypeMunger(new BcelTypeMunger(newAnnotationTM, decA.getAspect().resolve(world)));
+ onType.addInterTypeMunger(new BcelTypeMunger(newAnnotationTM, decA.getAspect().resolve(world)), false);
decA.copyAnnotationTo(onType);
}
}
newParentMunger.setIsMixin(true);
}
newParentMunger.setSourceLocation(p.getSourceLocation());
- onType.addInterTypeMunger(new BcelTypeMunger(newParentMunger, xcutSet.findAspectDeclaringParents(p)));
+ onType.addInterTypeMunger(new BcelTypeMunger(newParentMunger, xcutSet.findAspectDeclaringParents(p)), false);
}
}
return didSomething;
for (Iterator i = typeMungerList.iterator(); i.hasNext();) {
ConcreteTypeMunger m = (ConcreteTypeMunger) i.next();
if (!m.isLateMunger() && m.matches(onType)) {
- onType.addInterTypeMunger(m);
+ onType.addInterTypeMunger(m, false);
}
}
CompilationAndWeavingContext.leavingPhase(tok);
ResolvedTypeMunger newParentMunger = new NewParentTypeMunger(newParent);
newParentMunger.setSourceLocation(p.getSourceLocation());
onType.addInterTypeMunger(new BcelTypeMunger(newParentMunger, getCrosscuttingMembersSet()
- .findAspectDeclaringParents(p)));
+ .findAspectDeclaringParents(p)), false);
}
}
return didSomething;
didSomething = true;
ResolvedTypeMunger newAnnotationTM = new AnnotationOnTypeMunger(annoX);
newAnnotationTM.setSourceLocation(decA.getSourceLocation());
- onType.addInterTypeMunger(new BcelTypeMunger(newAnnotationTM, decA.getAspect().resolve(this)));
+ onType.addInterTypeMunger(new BcelTypeMunger(newAnnotationTM, decA.getAspect().resolve(this)), false);
decA.copyAnnotationTo(onType);
}
}