func (this *IOCFactory) createNewInst(context *registContext, args map[string]interface{}) interface{} { var returnValue interface{} newInst := reflect.New(context.bType.Elem()) returnValue = newInst.Interface() obj := newInst.Elem() if args != nil { rUtil := new(Util.ReflectUtil) rUtil.ObjSetFields(obj, args) } return returnValue }