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