private void ensureAspectJAttributesUnpacked() {
if ((bitflag & UNPACKED_AJATTRIBUTES) != 0) {
return;
}
bitflag |= UNPACKED_AJATTRIBUTES;
IMessageHandler msgHandler = getResolvedTypeX().getWorld().getMessageHandler();
// Pass in empty list that can store things for readAj5 to process
List<AjAttribute> l = null;
try {
l = Utility.readAjAttributes(className, javaClass.getAttributes(), getResolvedTypeX().getSourceContext(),
getResolvedTypeX().getWorld(), AjAttribute.WeaverVersionInfo.UNKNOWN, new BcelConstantPoolReader(javaClass
.getConstantPool()));
} catch (RuntimeException re) {
throw new RuntimeException("Problem processing attributes in " + javaClass.getFileName(), re);
}
List<ResolvedPointcutDefinition> pointcuts = new ArrayList<ResolvedPointcutDefinition>();
typeMungers = new ArrayList<ConcreteTypeMunger>();
declares = new ArrayList<Declare>();
processAttributes(l, pointcuts, false);
l = AtAjAttributes.readAj5ClassAttributes(((BcelWorld) getResolvedTypeX().getWorld()).getModelAsAsmManager(), javaClass,
getResolvedTypeX(), getResolvedTypeX().getSourceContext(), msgHandler, isCodeStyleAspect);
AjAttribute.Aspect deferredAspectAttribute = processAttributes(l, pointcuts, true);
if (pointcuts.size() == 0) {
this.pointcuts = ResolvedPointcutDefinition.NO_POINTCUTS;
} else {
this.pointcuts = pointcuts.toArray(new ResolvedPointcutDefinition[pointcuts.size()]);
}
resolveAnnotationDeclares(l);
if (deferredAspectAttribute != null) {
// we can finally process the aspect and its associated perclause...
perClause = deferredAspectAttribute.reifyFromAtAspectJ(this.getResolvedTypeX());
}
if (isAspect() && !Modifier.isAbstract(getModifiers()) && isGeneric()) {
msgHandler.handleMessage(MessageUtil.error("The generic aspect '" + getResolvedTypeX().getName()
+ "' must be declared abstract", getResolvedTypeX().getSourceLocation()));
}
}