List adviceWeavingRules = aspectDefinition.getAdviceWeavingRules();
for (Iterator it2 = adviceWeavingRules.iterator(); it2.hasNext();) {
AdviceWeavingRule weavingRule = (AdviceWeavingRule)it2.next();
// create set field pointcut
FieldPointcut pointcut = new FieldPointcut(uuid, weavingRule.getExpression());
// add all referenced poincuts definitions
boolean hasSetFieldPointcut = false;
List pointcutRefs = weavingRule.getPointcutRefs();
for (Iterator it3 = pointcutRefs.iterator(); it3.hasNext();) {
PointcutDefinition pointcutDefinition =
aspectDefinition.getPointcutDef((String)it3.next());
if (pointcutDefinition != null && pointcutDefinition.getType().
equalsIgnoreCase(PointcutDefinition.SET_FIELD)) {
pointcut.addPointcutDef(pointcutDefinition);
hasSetFieldPointcut = true;
}
}
// check if the weaving rule had a set field pointcut, if not continue
if (!hasSetFieldPointcut) {
continue;
}
// add pre and post advices
List adviceRefs = weavingRule.getAdviceRefs();
for (Iterator it3 = adviceRefs.iterator(); it3.hasNext();) {
String adviceRef = (String)it3.next();
if (AspectWerkz.getSystem(uuid).
getAdvice(adviceRef) instanceof PreAdvice) {
pointcut.addPreAdvice(adviceRef);
}
else if (AspectWerkz.getSystem(uuid).
getAdvice(adviceRef) instanceof PostAdvice) {
pointcut.addPostAdvice(adviceRef);
}
}
// add advices from advice stacks
List adviceStackRefs = weavingRule.getAdviceStackRefs();
for (Iterator it3 = adviceStackRefs.iterator(); it3.hasNext();) {
AdviceStackDefinition adviceStackDefinition =
definition.getAdviceStackDefinition((String)it3.next());
adviceRefs = adviceStackDefinition.getAdviceRefs();
for (Iterator it4 = adviceRefs.iterator(); it4.hasNext();) {
String adviceRef = (String)it4.next();
if (AspectWerkz.getSystem(uuid).
getAdvice(adviceRef) instanceof PreAdvice) {
pointcut.addPreAdvice(adviceRef);
}
else if (AspectWerkz.getSystem(uuid).
getAdvice(adviceRef) instanceof PostAdvice) {
pointcut.addPostAdvice(adviceRef);
}
}
}
// add the set field pointcut