if (!(bean instanceof ProtoBeanBuilder)) MappingUtils.throwMappingException("should be a ProtoBeanBuilder instance");
ProtoBeanBuilder builder = (ProtoBeanBuilder)bean;
value = ProtoUtils.wrapEnums(value);
if (value != null) {
builder.internalProtoBuilder().setField(getFieldDescriptor(), value);
} else {
builder.internalProtoBuilder().clearField(getFieldDescriptor());
}
}