View Javadoc
1   package org.pojomatic;
2   
3   import org.pojomatic.internal.PropertyAccessor;
4   import org.pojomatic.internal.PropertyField;
5   
6   public class TestUtils {
7   
8     public static PropertyElement field(Class<?> clazz, String fieldName) throws Exception {
9       return new PropertyField(clazz.getDeclaredField(fieldName), "");
10    }
11  
12    public static PropertyElement method(Class<?> clazz, String methodName) throws Exception {
13      return new PropertyAccessor(clazz.getDeclaredMethod(methodName), "");
14    }
15  
16  }