View Javadoc

1   package net.sf.crispy.strategy;
2   
3   import java.util.Map;
4   
5   import net.sf.crispy.InvocationStrategy;
6   import net.sf.crispy.util.Util;
7   
8   /**
9    * Convert class with package name in class name only:
10   * from <code>test.crispy.example.service.Calculator</code>
11   * to <code>Calculator</code>.
12   * 
13   * @author Linke
14   *
15   */
16  public class ClassWithOutPackageInvocationStrategy implements InvocationStrategy {
17  
18  	public Object convert(Map pvPropertyMap) {
19  		String lvClassName = (String) pvPropertyMap.get(InvocationStrategy.CLASS_NAME);
20  		lvClassName = Util.getClassNameWithOutPackage(lvClassName);
21  		return lvClassName;
22  	}
23  
24  }