Lines Matching refs:reflect
46 in := reflect.ValueOf(src)
50 out := reflect.New(in.Type().Elem())
83 in := reflect.ValueOf(src)
84 out := reflect.ValueOf(dst)
101 func mergeStruct(out, in reflect.Value) {
135 func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) {
139 out.Set(reflect.ValueOf(Clone(in.Interface().(Message))))
147 case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
148 reflect.String, reflect.Uint32, reflect.Uint64:
153 case reflect.Interface:
161 out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T)
164 case reflect.Map:
169 out.Set(reflect.MakeMap(in.Type()))
174 var val reflect.Value
176 case reflect.Ptr:
177 val = reflect.New(in.Type().Elem().Elem())
179 case reflect.Slice:
181 val = reflect.ValueOf(append([]byte{}, val.Bytes()...))
187 case reflect.Ptr:
192 out.Set(reflect.New(in.Elem().Type()))
195 case reflect.Slice:
199 if in.Type().Elem().Kind() == reflect.Uint8 {
217 out.Set(reflect.MakeSlice(in.Type(), 0, n))
220 case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
221 reflect.String, reflect.Uint32, reflect.Uint64:
222 out.Set(reflect.AppendSlice(out, in))
225 x := reflect.Indirect(reflect.New(in.Type().Elem()))
227 out.Set(reflect.Append(out, x))
230 case reflect.Struct:
242 v := reflect.New(reflect.TypeOf(eIn.value)).Elem()
243 mergeAny(v, reflect.ValueOf(eIn.value), false, nil)