for (Iterator it = definition.getAspectDefinitions().iterator(); it.hasNext();) {
AspectDefinition aspectDef = (AspectDefinition) it.next();
if (aspectDef.getName().equals(CFlowSystemAspect.CLASS_NAME)) {
continue;
}
PointcutManager pointcutManager = aspectManager.getPointcutManager(aspectDef.getName());
for (Iterator it2 = aspectDef.getAroundAdvices().iterator(); it2.hasNext();) {
AdviceDefinition adviceDef = (AdviceDefinition) it2.next();
Pointcut pointcut = pointcutManager.getPointcut(adviceDef.getExpressionInfo().getExpressionAsString());
if (pointcut == null) {
pointcut = new Pointcut(aspectManager, adviceDef.getExpressionInfo());
pointcutManager.addPointcut(pointcut);
}
pointcut.addAroundAdvice(aspectDef.getName() + '/' + adviceDef.getName());
}
for (Iterator it2 = aspectDef.getBeforeAdvices().iterator(); it2.hasNext();) {
AdviceDefinition adviceDef = (AdviceDefinition) it2.next();
Pointcut pointcut = pointcutManager.getPointcut(adviceDef.getExpressionInfo().getExpressionAsString());
if (pointcut == null) {
pointcut = new Pointcut(aspectManager, adviceDef.getExpressionInfo());
pointcutManager.addPointcut(pointcut);
}
pointcut.addBeforeAdvice(aspectDef.getName() + '/' + adviceDef.getName());
}
for (Iterator it2 = aspectDef.getAfterAdvices().iterator(); it2.hasNext();) {
AdviceDefinition adviceDef = (AdviceDefinition) it2.next();
Pointcut pointcut = pointcutManager.getPointcut(adviceDef.getExpressionInfo().getExpressionAsString());
if (pointcut == null) {
pointcut = new Pointcut(aspectManager, adviceDef.getExpressionInfo());
pointcutManager.addPointcut(pointcut);
}
if (adviceDef.getType().equals(AdviceType.AFTER) ||
adviceDef.getType().equals(AdviceType.AFTER_FINALLY)) {
pointcut.addAfterFinallyAdvices(aspectDef.getName() + '/' + adviceDef.getName());
}