MCPcopy Create free account
hub / github.com/apache/fory / getTypeInfoByType

Method getTypeInfoByType

go/fory/reader.go:198–212  ·  view source on GitHub ↗
(type_ reflect.Type)

Source from the content-addressed store, hash-verified

196}
197
198func (c *ReadContext) getTypeInfoByType(type_ reflect.Type) *TypeInfo {
199 if type_ == nil {
200 return nil
201 }
202 typePtr := typePointer(type_)
203 if typePtr == c.lastTypePtr && c.lastTypeInfo != nil {
204 return c.lastTypeInfo
205 }
206 info := c.typeResolver.getTypeInfoByType(type_)
207 if info != nil {
208 c.lastTypePtr = typePtr
209 c.lastTypeInfo = info
210 }
211 return info
212}
213
214// readFast reads a value using fast path based on DispatchId
215func (c *ReadContext) readFast(ptr unsafe.Pointer, ct DispatchId) {

Callers 3

ReadValueMethod · 0.95
initFieldsMethod · 0.45
initFieldsFromTypeDefMethod · 0.45

Calls 1

typePointerFunction · 0.85

Tested by

no test coverage detected