(Class<?> clazz, String fieldName)
| 135 | } |
| 136 | |
| 137 | protected static Field tryGetField(Class<?> clazz, String fieldName) { |
| 138 | try { |
| 139 | Field field = clazz.getField(fieldName); |
| 140 | if ( field!=null ) { |
| 141 | field.setAccessible(true); |
| 142 | } |
| 143 | return field; |
| 144 | } |
| 145 | catch (NoSuchFieldException ex) { |
| 146 | } |
| 147 | catch (SecurityException ex) { |
| 148 | } |
| 149 | return null; |
| 150 | } |
| 151 | |
| 152 | protected Object throwNoSuchProperty(Class<?> clazz, String propertyName, Exception cause) { |
| 153 | throw new STNoSuchPropertyException(cause, null, clazz.getName()+"."+propertyName); |
no test coverage detected