/** * Returns the {@code MethodInfo} that represents the execution of the method * identified by {@code hash}. * * @param hash a hash code that identifies uniquely a method inside the context. * @return a {@code MethodInfo} representing the queried method execution * joinpoint. */ public MethodInfo getMethodInfo(long hash) { return methodInfos.getMethodInfo(hash); }
public MethodInfo[] getMethodInfos() { long[] keys = methodInfos.keys(); MethodInfo[] minfos = new MethodInfo[keys.length]; for (int i = 0 ; i < keys.length ; i++) { minfos[i] = methodInfos.getMethodInfo(keys[i]); } return minfos; } }
public Object invokeMethod(InstanceAdvisor instanceAdvisor, Object target, long methodHash, Object[] arguments) throws Throwable { MethodInfo info = methodInfos.getMethodInfo(methodHash); if (info == null && logger.isDebugEnabled()) { logger.debug("info is null for hash: " + methodHash + " of " + clazz.getName()); } return invokeMethod(instanceAdvisor, target, methodHash, arguments, info); }
public Object invokeMethod(Object target, long methodHash, Object[] arguments) throws Throwable { InstanceAdvisor advisor = null; if (target != null) { InstanceAdvised advised = (InstanceAdvised) target; advisor = advised._getInstanceAdvisor(); } MethodInfo info = methodInfos.getMethodInfo(methodHash); return invokeMethod(advisor, target, methodHash, arguments, info); }
/** * Called by initialiseMethods() in generated advisor sub classes */ protected void addMethodInfo(MethodInfo mi) { MethodInfo old = methodInfos.getMethodInfo(mi.getHash()); if (old != null) { overriddenMethods.add(old); } methodInfos.put(mi.getHash(), mi); advisorStrategy.makeAccessibleMethod(mi); }
MethodInfo methodInfo = methodInterceptors.getMethodInfo(key); this.methodInterceptors.put(methodInfo, methodInfo.getInterceptors());
MethodInfo newMethodInfo = newMethodInterceptors.getMethodInfo(key); Interceptor[] oldInterceptorChain = this.methodInterceptors.get(newMethodInfo); if ((oldInterceptorChain == null || oldInterceptorChain.length == 0) MethodInfo methodInfo = newMethodInterceptors.getMethodInfo(key); this.methodInterceptors.put(methodInfo, methodInfo.getInterceptors());
MethodInvocation methodInvocation = (MethodInvocation) invocation; long hash = methodInvocation.getMethodHash(); MethodInfo info = methodInfos.getMethodInfo(hash);