(Class<?> clazz, String name)
| 210 | } |
| 211 | |
| 212 | public static long getFieldOffset(Class<?> clazz, String name) { |
| 213 | try { |
| 214 | return UNSAFE.objectFieldOffset(clazz.getDeclaredField(name)); |
| 215 | } catch (NoSuchFieldException e) { |
| 216 | throw new ExceptionInInitializerError(e); |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | public static float getFloat(long address) { |
| 221 | return UNSAFE.getFloat(address); |