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

Method GetReadObject

go/fory/ref_resolver.go:273–284  ·  view source on GitHub ↗

GetReadObject returns the object for the specified id.

(refId int32)

Source from the content-addressed store, hash-verified

271
272// GetReadObject returns the object for the specified id.
273func (r *RefResolver) GetReadObject(refId int32) reflect.Value {
274 if !r.refTracking {
275 return reflect.Value{}
276 }
277 if refId < 0 {
278 return r.readObject
279 }
280 if int(refId) >= len(r.readObjects) {
281 return reflect.Value{}
282 }
283 return r.readObjects[refId]
284}
285
286func (r *RefResolver) GetCurrentReadObject() reflect.Value {
287 return r.readObject

Callers 15

ReadRefOrNullMethod · 0.95
TryPreserveRefIdMethod · 0.95
readDifferentTypesMethod · 0.80
ReadMethod · 0.80
readSameTypeMethod · 0.80
readDifferentTypesMethod · 0.80
ReadMethod · 0.80
readUnionOverrideValueFunction · 0.80
readArrayRefAndTypeFunction · 0.80
readSingleValueMethod · 0.80
readMapRefAndTypeFunction · 0.80
ReadMethod · 0.80

Calls

no outgoing calls

Tested by 1