• Home
  • Raw
  • Download

Lines Matching refs:reflect

368 func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError {
395 func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError {
410 if typ.Kind() == reflect.Ptr {
412 if typ.Elem().Kind() == reflect.String {
415 } else if typ.Kind() == reflect.Slice {
417 if typ.Elem().Kind() != reflect.Ptr {
420 } else if typ.Kind() == reflect.String {
435 func (p *textParser) readStruct(sv reflect.Value, terminator string) error {
492 v := reflect.New(mt.Elem())
516 for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) {
529 typ := reflect.TypeOf(desc.ExtensionType)
538 var ext reflect.Value
540 ext = reflect.New(typ).Elem()
542 ext = reflect.New(typ.Elem()).Elem()
555 var sl reflect.Value
557 sl = reflect.ValueOf(old) // existing slice
559 sl = reflect.MakeSlice(typ, 0, 1)
561 sl = reflect.Append(sl, ext)
572 var dst reflect.Value
579 nv := reflect.New(oop.Type.Elem())
591 if dst.Kind() == reflect.Map {
599 dst.Set(reflect.MakeMap(dst.Type()))
601 key := reflect.New(dst.Type().Key()).Elem()
602 val := reflect.New(dst.Type().Elem()).Elem()
737 func (p *textParser) readAny(v reflect.Value, props *Properties) error {
747 case reflect.Slice:
749 if at.Elem().Kind() == reflect.Uint8 {
758 fv.Set(reflect.ValueOf(bytes))
765 fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem()))
785 fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem()))
787 case reflect.Bool:
797 case reflect.Float32, reflect.Float64:
808 case reflect.Int32:
827 case reflect.Int64:
833 case reflect.Ptr:
836 fv.Set(reflect.New(fv.Type().Elem()))
838 case reflect.String:
843 case reflect.Struct:
855 case reflect.Uint32:
860 case reflect.Uint64:
878 v := reflect.ValueOf(pb)