public static long fieldOffset(Class<?> cls,String fieldName){
  try {
    return objectFieldOffset(cls.getDeclaredField(fieldName));
  }
 catch (  NoSuchFieldException e) {
    throw new IllegalStateException(e);
  }
}

public static long fieldOffset ( Class < ? > cls , String fieldName ) { try { return objectFieldOffset ( cls . getDeclaredField ( fieldName ) ) ; } catch ( NoSuchFieldException e ) { throw new IllegalStateException ( e ) ; } }
gets object field offset .
