• Home
  • Raw
  • Download

Lines Matching refs:reflect

116 	v := reflect.ValueOf(x)
117 return v.Kind() == reflect.Ptr && v.IsNil()
174 t := reflect.TypeOf(ed.ExtensionType)
175 return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8
236 if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b {
248 base reflect.Type
260 key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field}
277 prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil)
383 t := reflect.TypeOf(extension.ExtensionType)
396 if t.Kind() != reflect.Ptr {
402 value := reflect.New(t).Elem()
403 value.Set(reflect.New(value.Type().Elem()))
404 if sf.kind == reflect.Int32 {
410 value.Elem().Set(reflect.ValueOf(sf.value))
417 t := reflect.TypeOf(extension.ExtensionType)
422 value := reflect.New(t).Elem()
505 typ := reflect.TypeOf(extension.ExtensionType)
506 if typ != reflect.TypeOf(value) {
514 if reflect.ValueOf(value).IsNil() {
538 var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc)
542 st := reflect.TypeOf(desc.ExtendedType).Elem()
558 return extensionMaps[reflect.TypeOf(pb).Elem()]
564 switch rv := reflect.ValueOf(v); rv.Kind() {
565 …case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32,
567 rv2 := reflect.New(rv.Type())
570 case reflect.Ptr:
573 case reflect.Slice:
575 v = reflect.Zero(rv.Type().Elem()).Interface()
587 switch rv := reflect.ValueOf(v); rv.Kind() {
588 case reflect.Ptr:
591 …case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32,
593 v = reflect.Zero(rv.Type().Elem()).Interface()
598 case reflect.Slice:
600 if rv.Type().Elem().Kind() != reflect.Uint8 {
601 rv2 := reflect.New(rv.Type())