• Home
  • Raw
  • Download

Lines Matching refs:reflect

114 	Type  reflect.Type // pointer to generated struct type for this oneof field
147 stype reflect.Type // set for struct types only
150 mtype reflect.Type // set for map types only
260 var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem()
263 func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) {
265 case reflect.Ptr:
266 if t1.Elem().Kind() == reflect.Struct {
270 case reflect.Slice:
271 if t2 := t1.Elem(); t2.Kind() == reflect.Ptr && t2.Elem().Kind() == reflect.Struct {
275 case reflect.Map:
278 …p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
281 if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice {
284 vtype = reflect.PtrTo(vtype)
299 marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem()
303 func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) {
307 func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp b…
320 propertiesMap = make(map[reflect.Type]*StructProperties)
325 func GetProperties(t reflect.Type) *StructProperties {
326 if t.Kind() != reflect.Struct {
355 func getPropertiesLocked(t reflect.Type) *StructProperties {
394 switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) {
405 Type: reflect.ValueOf(oot).Type(), // *T
415 if f.Type.Kind() != reflect.Interface {
473 protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types
474 revProtoTypes = make(map[reflect.Type]string)
485 t := reflect.TypeOf(x)
486 if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 {
491 protoTypedNils[name] = reflect.Zero(t).Interface().(Message)
499 if reflect.TypeOf(x).Kind() != reflect.Map {
506 t := reflect.TypeOf(x)
519 return revProtoTypes[reflect.TypeOf(x)]
525 func MessageType(name string) reflect.Type {
527 return reflect.TypeOf(t)