Changeset 11104 in josm for trunk/test/unit/org/openstreetmap/josm/TestUtils.java
- Timestamp:
- 2016-10-08T15:28:54+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/TestUtils.java
r11102 r11104 9 9 import java.io.IOException; 10 10 import java.io.InputStream; 11 import java.lang.reflect.Field; 11 12 import java.util.Arrays; 12 13 import java.util.Collection; … … 164 165 165 166 /** 167 * Returns a private field value. 168 * @param obj object 169 * @param fieldName private field name 170 * @return private field value 171 * @throws ReflectiveOperationException if a reflection operation error occurs 172 */ 173 public static Object getPrivateField(Object obj, String fieldName) throws ReflectiveOperationException { 174 Field f = obj.getClass().getDeclaredField(fieldName); 175 f.setAccessible(true); 176 return f.get(obj); 177 } 178 179 /** 166 180 * Returns an instance of {@link AbstractProgressMonitor} which keeps track of the monitor state, 167 181 * but does not show the progress.
Note:
See TracChangeset
for help on using the changeset viewer.
