AspectDefinition aspectDef = (AspectDefinition)it1.next();
AspectMetaData aspect = SystemLoader.getSystem(uuid).
getAspectMetaData(aspectDef.getName());
for (Iterator it2 = aspectDef.getAllAdvices().iterator(); it2.hasNext();) {
AdviceDefinition adviceDef = (AdviceDefinition)it2.next();
Expression expression = adviceDef.getExpression();
for (Iterator it3 = expression.getCflowExpressions().entrySet().iterator(); it3.hasNext();) {
Map.Entry entry = (Map.Entry) it3.next();
Expression value = (Expression) entry.getValue();
if (value instanceof ExpressionExpression) {
// recursive
//TODO exprexpr using exprexpr
// like pc cflow = "a or b"
// .. pc exec = "c IN cflow"
(new Exception("todo")).printStackTrace();
} else {
// get the referenced cflow poincut definition
PointcutDefinition cflowPointcutDef =
aspectDef.getPointcutDef(value.getName());
// create call pointcut
CallPointcut pointcut = new CallPointcut(uuid, value);
// register the cflow advices in the system and create the cflow system aspect
// (if it does not already exist)
if (!SystemLoader.getSystem(uuid).hasAspect(CFlowSystemAspect.NAME)) {
AspectDefinition cflowAspect = new AspectDefinition(
CFlowSystemAspect.NAME,
CFlowSystemAspect.CLASS_NAME,
CFlowSystemAspect.DEPLOYMENT_MODEL
);
cflowAspect.addPointcut(cflowPointcutDef);
Class cflowAspectClass = CFlowSystemAspect.class;
try {
// add the cflow pre advice
cflowAspect.addBeforeAdvice(new AdviceDefinition(
CFlowSystemAspect.PRE_ADVICE,
cflowAspect.getName(),
cflowAspect.getClassName(),
value,
cflowAspectClass.getDeclaredMethod(
CFlowSystemAspect.PRE_ADVICE,
new Class[]{JoinPoint.class}),
CFlowSystemAspect.PRE_ADVICE_INDEX,
cflowAspect
));
// add the cflow post advice
cflowAspect.addAfterAdvice(new AdviceDefinition(
CFlowSystemAspect.POST_ADVICE,
cflowAspect.getName(),
cflowAspect.getClassName(),
value,
cflowAspectClass.getDeclaredMethod(