public override IReflectClass ReflectClassFromElementsEntry(ObjectContainerBase container , ArrayInfo info, int classID) { if (classID == Const4.IgnoreId) { // TODO: Here is a low-frequency mistake, extremely unlikely. // If classID == 99999 by accident then we will get ignore. return null; } info.Primitive(false); if (UseJavaHandling()) { if (classID < Const4.Primitive) { info.Primitive(true); classID -= Const4.Primitive; } } classID = -classID; ClassMetadata classMetadata = container.ClassMetadataForID(classID); if (classMetadata != null) { return ClassReflector(container.Reflector(), classMetadata, info.Primitive()); } return null; }
public static ClassMetadata ErasedFieldType(ObjectContainerBase container, IReflectClass fieldType) { return(fieldType.IsInterface() ? container.ClassMetadataForID(UntypedId) : container .ProduceClassMetadata(BaseType(fieldType))); }
public virtual IReflectClass ReflectClassFromElementsEntry(ObjectContainerBase container , ArrayInfo info, int classID) { if (classID == 0) { return null; } ClassMetadata classMetadata = container.ClassMetadataForID(classID); if (classMetadata == null) { return null; } return ClassReflector(container.Reflector(), classMetadata, info.Primitive()); }
private ObjectHeader(ObjectContainerBase container, Db4objects.Db4o.Internal.ClassMetadata classMetadata, IReadWriteBuffer reader) { int classID = reader.ReadInt(); _marshallerFamily = ReadMarshallerFamily(reader, classID); classID = NormalizeID(classID); _classMetadata = (classMetadata != null ? classMetadata : container.ClassMetadataForID (classID)); // This check has been added to cope with defragment in debug mode: SlotDefragment#setIdentity() // will trigger calling this constructor with a source db class metadata and a target db stream, // thus _classMetadata==null. There may be a better solution, since this call is just meant to // skip the object header. _headerAttributes = SlotFormat().ReadHeaderAttributes((ByteArrayBuffer)reader); }
public void Read(ObjectContainerBase stream, ClassMetadata clazz, ByteArrayBuffer reader) { clazz.SetAncestor(stream.ClassMetadataForID(reader.ReadInt())); // if(clazz.callConstructor()){ // // The logic further down checks the ancestor YapClass, whether // // or not it is allowed, not to call constructors. The ancestor // // YapClass may possibly have not been loaded yet. // clazz.createConstructor(true); // } clazz.CheckType(); ReadIndex(stream, clazz, reader); clazz._aspects = ReadAspects(stream, reader, clazz); }
public static ClassMetadata ErasedFieldType(ObjectContainerBase container, IReflectClass fieldType) { return fieldType.IsInterface() ? container.ClassMetadataForID(UntypedId) : container .ProduceClassMetadata(BaseType(fieldType)); }
public override ClassMetadata ClassMetadataForID(int id) { return(_parent.ClassMetadataForID(id)); }
public virtual ClassMetadata ClassMetadataForID(int id) { return(_server.ClassMetadataForID(id)); }