svoid resetFields(O object, S fields) { if (object == null) ret; O emptyInstance = newInstance(object.getClass()); for (S field : identifiers(fields)) setOpt(object, getOpt(emptyInstance, field)); }