List cflowExpressionList = new ArrayList();
AspectManager[] aspectManagers = system.getAspectManagers();
switch (joinPointType) {
case JoinPointType.METHOD_EXECUTION:
MethodTuple methodTuple = AspectRegistry.getMethodTuple(declaringClass, joinPointHash);
MethodSignatureImpl methodSignature = new MethodSignatureImpl(
methodTuple.getDeclaringClass(),
methodTuple);
tuple.signature = methodSignature;
tuple.rtti = new MethodRttiImpl(methodSignature, thisInstance, targetInstance);
MethodInfo methodInfo = JavaMethodInfo.getMethodInfo(methodTuple.getWrapperMethod());
ClassInfo withinInfo = JavaClassInfo.getClassInfo(targetClass);
ExpressionContext ctx = new ExpressionContext(PointcutType.EXECUTION, methodInfo, methodInfo);//AVAJ
for (int i = 0; i < aspectManagers.length; i++) {
for (Iterator it = aspectManagers[i].getPointcuts(ctx).iterator(); it.hasNext();) {
Pointcut pointcut = (Pointcut) it.next();
if (pointcut.getExpressionInfo().hasCflowPointcut()) {
cflowExpressionList.add(pointcut.getExpressionInfo().getCflowExpressionRuntime());
}
}
}
tuple.cflowExpressions = cflowExpressionList;
tuple.expressionContext = ctx;
break;
case JoinPointType.METHOD_CALL:
methodTuple = AspectRegistry.getMethodTuple(declaringClass, joinPointHash);
methodSignature = new MethodSignatureImpl(methodTuple.getDeclaringClass(), methodTuple);
tuple.signature = methodSignature;
tuple.rtti = new MethodRttiImpl(methodSignature, thisInstance, targetInstance);
methodInfo = JavaMethodInfo.getMethodInfo(methodTuple.getWrapperMethod());
withinInfo = JavaClassInfo.getClassInfo(targetClass);
ctx = new ExpressionContext(PointcutType.CALL, methodInfo, withinInfo);