|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
PropertyTransformer.java | - | 100% | 100% | 100% |
|
1 | package photospace.beans; | |
2 | ||
3 | import org.apache.commons.collections.*; | |
4 | import org.springframework.beans.*; | |
5 | ||
6 | public class PropertyTransformer implements Transformer | |
7 | { | |
8 | private String property; | |
9 | 7 | public PropertyTransformer(String property) |
10 | { | |
11 | 7 | this.property = property; |
12 | } | |
13 | 14 | public Object transform(Object obj) |
14 | { | |
15 | 14 | BeanWrapper wrapper = new BeanWrapperImpl(obj); |
16 | 14 | return wrapper.getPropertyValue(property); |
17 | } | |
18 | } |
|