/* */ private Object invokeOriginalChainIfExists(Invocation invocation, Method method, Object targetObject, Object[] args)
/* */ throws Throwable
/* */ {
/* 1317 */ if ((invocation instanceof MethodCalledByConstructorInvocation))
/* */ {
/* 1319 */ MethodCalledByConstructorInvocation inv = (MethodCalledByConstructorInvocation)invocation;
/* 1320 */ Constructor callingCon = inv.getCalling();
/* 1321 */ Class callingClass = callingCon.getDeclaringClass();
/* 1322 */ if (isAdvised(callingClass))
/* */ {
/* 1324 */ ClassAdvisor advisor = AspectManager.instance().getAdvisor(callingClass);
/* 1325 */ if (advisor != null)
/* */ {
/* 1327 */ int index = advisor.getConstructorIndex(callingCon);
/* 1328 */ if (index >= 0)
/* */ {
/* 1330 */ HashMap calledClassesMap = advisor.getMethodCalledByConInterceptors()[index];
/* 1331 */ if (calledClassesMap != null)
/* */ {
/* 1333 */ TLongObjectHashMap calledMethods = (TLongObjectHashMap)calledClassesMap.get(method.getDeclaringClass().getName());
/* 1334 */ if (calledMethods != null)
/* */ {
/* 1336 */ long calledHash = MethodHashing.calculateHash(method);
/* */
/* 1338 */ MethodByConInfo info = (MethodByConInfo)calledMethods.get(calledHash);
/* */
/* 1340 */ if ((info != null) && (info.hasAdvices()))
/* */ {
/* 1343 */ return advisor.invokeConstructorCaller(info, inv.getCallingObject(), targetObject, args);
/* */ }
/* */ }
/* */ }
/* */ }
/* */ }
/* */ }
/* */ }
/* 1351 */ else if ((invocation instanceof MethodCalledByMethodInvocation))
/* */ {
/* 1353 */ MethodCalledByMethodInvocation inv = (MethodCalledByMethodInvocation)invocation;
/* 1354 */ Method callingMethod = inv.getCallingMethod();
/* 1355 */ if (isAdvised(callingMethod.getDeclaringClass()))
/* */ {
/* 1357 */ ClassAdvisor advisor = AspectManager.instance().getAdvisor(callingMethod.getDeclaringClass());
/* 1358 */ if (advisor != null)
/* */ {
/* 1360 */ long callingMethodHash = MethodHashing.calculateHash(callingMethod);
/* 1361 */ long calledHash = MethodHashing.calculateHash(method);
/* */
/* 1363 */ HashMap calledClassesMap = (HashMap)advisor.getMethodCalledByMethodInterceptors().get(callingMethodHash);
/* 1364 */ if (calledClassesMap != null)
/* */ {
/* 1366 */ TLongObjectHashMap calledMethods = (TLongObjectHashMap)calledClassesMap.get(method.getDeclaringClass().getName());
/* 1367 */ if (calledMethods != null)
/* */ {
/* 1370 */ MethodByMethodInfo info = (MethodByMethodInfo)calledMethods.get(calledHash);
/* */
/* 1372 */ if ((info != null) && (info.hasAdvices()))
/* */ {
/* 1375 */ return advisor.invokeCaller(info, inv.getCallingObject(), targetObject, args);
/* */ }
/* */ }
/* */ }
/* */ }
/* */