本文整理汇总了Java中org.springframework.aop.support.AopUtils.isToStringMethod方法的典型用法代码示例。如果您正苦于以下问题:Java AopUtils.isToStringMethod方法的具体用法?Java AopUtils.isToStringMethod怎么用?Java AopUtils.isToStringMethod使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.aop.support.AopUtils
的用法示例。
在下文中一共展示了AopUtils.isToStringMethod方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: invoke
import org.springframework.aop.support.AopUtils; //导入方法依赖的package包/类
@Override
public Object invoke(MethodInvocation invocation) throws Throwable {
if (AopUtils.isToStringMethod(invocation.getMethod())) {
return "JAX-WS proxy for port [" + getPortName() + "] of service [" + getServiceName() + "]";
}
// Lazily prepare service and stub if necessary.
synchronized (this.preparationMonitor) {
if (!isPrepared()) {
prepare();
}
}
return doInvoke(invocation);
}
示例2: doInvoke
import org.springframework.aop.support.AopUtils; //导入方法依赖的package包/类
/**
* Apply the given AOP method invocation to the given {@link RmiInvocationHandler}.
* <p>The default implementation delegates to {@link #createRemoteInvocation}.
* @param methodInvocation the current AOP method invocation
* @param invocationHandler the RmiInvocationHandler to apply the invocation to
* @return the invocation result
* @throws RemoteException in case of communication errors
* @throws NoSuchMethodException if the method name could not be resolved
* @throws IllegalAccessException if the method could not be accessed
* @throws InvocationTargetException if the method invocation resulted in an exception
* @see org.springframework.remoting.support.RemoteInvocation
*/
protected Object doInvoke(MethodInvocation methodInvocation, RmiInvocationHandler invocationHandler)
throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
if (AopUtils.isToStringMethod(methodInvocation.getMethod())) {
return "RMI invoker proxy for service URL [" + getServiceUrl() + "]";
}
return invocationHandler.invoke(createRemoteInvocation(methodInvocation));
}
示例3: doInvoke
import org.springframework.aop.support.AopUtils; //导入方法依赖的package包/类
/**
* Apply the given AOP method invocation to the given {@link RmiInvocationHandler}.
* <p>The default implementation delegates to {@link #createRemoteInvocation}.
* @param methodInvocation the current AOP method invocation
* @param invocationHandler the RmiInvocationHandler to apply the invocation to
* @return the invocation result
* @throws RemoteException in case of communication errors
* @throws NoSuchMethodException if the method name could not be resolved
* @throws IllegalAccessException if the method could not be accessed
* @throws InvocationTargetException if the method invocation resulted in an exception
* @see org.springframework.remoting.support.RemoteInvocation
*/
protected Object doInvoke(MethodInvocation methodInvocation, RmiInvocationHandler invocationHandler)
throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
if (AopUtils.isToStringMethod(methodInvocation.getMethod())) {
return "RMI invoker proxy for service URL [" + getJndiName() + "]";
}
return invocationHandler.invoke(createRemoteInvocation(methodInvocation));
}