reversemethodreplacer.java
来自「spring的源代码」· Java 代码 · 共 24 行
JAVA
24 行
/*
* The Spring Framework is published under the terms
* of the Apache Software License.
*/
package org.springframework.beans.factory.xml;
import java.io.Serializable;
import java.lang.reflect.Method;
import org.springframework.beans.factory.support.MethodReplacer;
/**
* @author Rod Johnson
*/
public class ReverseMethodReplacer implements MethodReplacer, Serializable {
public Object reimplement(Object obj, Method method, Object[] args) throws Throwable {
String s = (String) args[0];
return new StringBuffer(s).reverse().toString();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?