List adviceWeavingRules = aspectDefinition.getAdviceWeavingRules();
for (Iterator it2 = adviceWeavingRules.iterator(); it2.hasNext();) {
AdviceWeavingRule weavingRule = (AdviceWeavingRule)it2.next();
// create method pointcut
MethodPointcut methodPointcut = new MethodPointcut(
uuid,
weavingRule.getExpression()
);
// add all referenced method poincuts definitions
boolean hasMethodPointcut = false;
List methodPointcutRefs = weavingRule.getPointcutRefs();
for (Iterator it3 = methodPointcutRefs.iterator(); it3.hasNext();) {
String pointcutName = (String)it3.next();
PointcutDefinition pointcutDefinition =
aspectDefinition.getPointcutDef(pointcutName);
if (pointcutDefinition != null && pointcutDefinition.getType().
equalsIgnoreCase(PointcutDefinition.METHOD)) {
methodPointcut.addPointcutDef(pointcutDefinition);
hasMethodPointcut = true;
}
}
// check if the weaving rule had a method pointcut, if not continue
if (!hasMethodPointcut) {
continue;
}
// add advice references
List adviceRefs = weavingRule.getAdviceRefs();
for (Iterator it3 = adviceRefs.iterator(); it3.hasNext();) {
methodPointcut.addAdvice((String)it3.next());
}
// add advices from advice stacks
List adviceStackRefs = weavingRule.getAdviceStackRefs();
for (Iterator it3 = adviceStackRefs.iterator(); it3.hasNext();) {
AdviceStackDefinition adviceStackDefinition =
definition.getAdviceStackDefinition((String)it3.next());
List advices = adviceStackDefinition.getAdviceRefs();
for (Iterator it4 = advices.iterator(); it4.hasNext();) {
methodPointcut.addAdvice((String)it4.next());
}
}
// add the method pointcut
aspect.addMethodPointcut(methodPointcut);
}