Examples of ReflectiveMethodInvocation


Examples of org.springframework.aop.framework.ReflectiveMethodInvocation

    public void setMethodNamingStrategy(MethodNamingStrategy methodNamingStrategy) {
        this.methodNamingStrategy = methodNamingStrategy;
    }

    protected Object calculateStatsOnMethodInvocation(MethodInvocation methodInvocation) throws Throwable {
        final ReflectiveMethodInvocation reflectiveMethodInvocation = (ReflectiveMethodInvocation) methodInvocation;
        final Class<? extends Object> targetClass = AopUtils.getTargetClass(reflectiveMethodInvocation.getProxy());
        //final Method currentMethod = AopUtils.getMostSpecificMethod(methodInvocation.getMethod(), targetClass);
        final Method candidateMethod = methodInvocation.getMethod();
        final Method currentMethod = targetClass.getMethod(candidateMethod.getName(), candidateMethod.getParameterTypes());
        long start = System.currentTimeMillis();
        try {
View Full Code Here

Examples of org.springframework.aop.framework.ReflectiveMethodInvocation

    private class OneWayInterceptor implements MethodInterceptor {
        public Object invoke(MethodInvocation mi) throws Throwable {
            try {
                // TODO this is not right
                ReflectiveMethodInvocation rmi = (ReflectiveMethodInvocation) mi;
                final MethodInvocation clone = rmi.invocableClone();
                System.out.println("EXECUTE DEFERRED");
                taskExecutor.execute(new Runnable() {
                    public void run() {
                        try {
                            clone.proceed();
View Full Code Here

Examples of org.springframework.aop.framework.ReflectiveMethodInvocation

    public Object invokeOld(ProceedingJoinPoint pjp) throws Throwable {
        log.info("aspect invoked");
        Field methodInvocationField = MethodInvocationProceedingJoinPoint.class.getDeclaredField("methodInvocation");
        methodInvocationField.setAccessible(true);
        ReflectiveMethodInvocation methodInvocation = (ReflectiveMethodInvocation) methodInvocationField.get(pjp);

        Field methodField = ReflectiveMethodInvocation.class.getDeclaredField("method");
        methodField.setAccessible(true);
        Method method = (Method) methodField.get(methodInvocation);
View Full Code Here

Examples of org.springframework.aop.framework.ReflectiveMethodInvocation

    public void setMethodNamingStrategy(MethodNamingStrategy methodNamingStrategy) {
        this.methodNamingStrategy = methodNamingStrategy;
    }

    protected Object calculateStatsOnMethodInvocation(MethodInvocation methodInvocation) throws Throwable {
        final ReflectiveMethodInvocation reflectiveMethodInvocation = (ReflectiveMethodInvocation) methodInvocation;
        final Class targetClass = AopUtils.getTargetClass(reflectiveMethodInvocation.getProxy());
        //final Method currentMethod = AopUtils.getMostSpecificMethod(methodInvocation.getMethod(), targetClass);
        final Method candidateMethod = methodInvocation.getMethod();
        final Method currentMethod = targetClass.getMethod(candidateMethod.getName(), candidateMethod.getParameterTypes());
        long start = System.currentTimeMillis();
        try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.