KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > beans > factory > xml > ReverseMethodReplacer


1 /*
2  * The Spring Framework is published under the terms
3  * of the Apache Software License.
4  */

5  
6 package org.springframework.beans.factory.xml;
7
8 import java.io.Serializable JavaDoc;
9 import java.lang.reflect.Method JavaDoc;
10
11 import org.springframework.beans.factory.support.MethodReplacer;
12
13 /**
14  * @author Rod Johnson
15  */

16 public class ReverseMethodReplacer implements MethodReplacer, Serializable JavaDoc {
17
18     public Object JavaDoc reimplement(Object JavaDoc obj, Method JavaDoc method, Object JavaDoc[] args) throws Throwable JavaDoc {
19         String JavaDoc s = (String JavaDoc) args[0];
20         return new StringBuffer JavaDoc(s).reverse().toString();
21     }
22
23 }
24
Popular Tags