public static long objectFieldOffset(final Class<?> clazz, final String fieldName) {
        try {
            return objectFieldOffset(clazz.getDeclaredField(fieldName));
        } catch (final NoSuchFieldException e) {
            UNSAFE_ACCESSOR.throwException(e);
        }
        return -1; // never get here
    }
Returns the offset of the provided class and fieldName, or {@code -1} if {@code sun.misc.Unsafe} is not
available.
jraft-core/src/main/java/com/alipay/sofa/jraft/util/internal/UnsafeUtil.java