static <T> FieldSetter<T> getFieldSetter(final Class<T> clazz, String fieldName) {
    try {
      Field field = clazz.getDeclaredField(fieldName);
      return new FieldSetter<T>(field);
    } catch (NoSuchFieldException e) {
      throw new AssertionError(e); // programmer error
    }
  }
static <T> FieldSetter<T> getFieldSetter(final Class<T> clazz, String fieldName) {
    try {
      Field field = clazz.getDeclaredField(fieldName);
      return new FieldSetter<T>(field);
    } catch (NoSuchFieldException e) {
      throw new AssertionError(e); 
    }
  }
static < T > FieldSetter < T > getFieldSetter ( final Class < T > clazz , String fieldName ) { try { Field field = clazz . getDeclaredField ( fieldName ) ; return new FieldSetter < T > ( field ) ; } catch ( NoSuchFieldException e ) { throw new AssertionError ( e ) ; // programmer error } }
Secret sauce for setting final fields; don't make it public.
Secret sauce for setting final fields ; don t make it public .