sclass DefaultValueConverterForField implements ValueConverterForField { public OrError convertValue(O object, Field field, O value) { Class type = primitiveToBoxedTypeOpt(field.getType()); // nothing to do if (isInstance(type, value)) ret OrError(value); // int magic if (type == Int.class && !value instanceof Int) { ret OrError(toInt(trimIfString(value)); } // bool magic if (type == Bool.class && value instanceof S) ret OrError(eqicOneOf((S) value, "1", "true")); // GlobalID magic ifclass GlobalID if (type == GlobalID.class && value instanceof S) ret OrError(GlobalID((S) value)); endif ret OrError(value); } }