从 AOP 调用中获取方法名称和参数 class

Getting Method name and Parameters form AOP Invocation class

我已经创建了一个自定义的 AOP 拦截器并在域 "Stateless Bean" 下的 jboss 6 -> deploy-> ejb3-interceptor-aop.xml 文件中配置了它。现在所有对任何无状态 Bean 的请求都被自定义拦截器拦截:

import java.util.logging.Level;
import java.util.logging.Logger;
import org.jboss.aop.advice.Interceptor;
import org.jboss.aop.joinpoint.Invocation;

public class SimpleInterceptor implements Interceptor {

@Override
public String getName() {
    return "SimpleInterceptor";
}

@Override
public Object invoke(Invocation invocation) throws Throwable {

    System.out.println("SimpleInterceptor - Logging BEFORE calling method :"+invocation);
    Object localObject1 = invocation.invokeNext();
    System.out.println("SimpleInterceptor - Logging AFTER calling method :");
    return localObject1;
}

} 

但是我如何识别通过自定义拦截器调用了哪个Stateless Bean,因为org.jboss.aop.joinpoint.Invocation class 没有提供方法细节和输入参数。那么有没有提取方法名和入参的选项呢?

获取参数: https://docs.jboss.org/jbossaop/docs/2.0.0.GA/docs/aspect-framework/apidocs/org/jboss/aop/joinpoint/MethodInvocation.html#getArguments()

获取方法详情: https://docs.jboss.org/jbossaop/docs/2.0.0.GA/docs/aspect-framework/apidocs/org/jboss/aop/joinpoint/MethodInvocation.html#getMethod%28%29