List adviceWeavingRules = aspectDefinition.getAdviceWeavingRules();
for (Iterator it2 = adviceWeavingRules.iterator(); it2.hasNext();) {
AdviceWeavingRule weavingRule = (AdviceWeavingRule)it2.next();
// create throws pointcut
ThrowsPointcut pointcut = new ThrowsPointcut(uuid, weavingRule.getExpression());
// add all referenced poincuts definitions
boolean hasThrowsPointcut = 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.THROWS)) {
pointcut.addPointcutDef(pointcutDefinition);
hasThrowsPointcut = true;
}
}
// check if the weaving rule had a throws pointcut, if not continue
if (!hasThrowsPointcut) {
continue;
}
// add advices
List adviceRefs = weavingRule.getAdviceRefs();
for (Iterator it3 = adviceRefs.iterator(); it3.hasNext();) {
String asdf = (String)it3.next();
pointcut.addAdvice(asdf);
}
// 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();) {
pointcut.addAdvice((String)it4.next());
}
}
// add the throws pointcut
aspect.addThrowsPointcut(pointcut);