Examples of deserializeOnto()


Examples of org.terasology.persistence.typeHandling.Serializer.deserializeOnto()

                dataMap.put(fieldInfo, new ProtobufPersistedData(field.getValue()));
            } else if (field.hasNameIndex()) {
                logger.warn("Cannot deserialize unknown field '{}' onto '{}'", field.getName(), componentMetadata.getUri());
            }
        }
        serializer.deserializeOnto(targetComponent, dataMap, context, fieldCheck);
        return targetComponent;
    }


    /**
 
View Full Code Here

Examples of org.terasology.persistence.typeHandling.Serializer.deserializeOnto()

            if (fieldInfo == null) {
                logger.error("Unable to serialize field {}, out of bounds", fieldId);
                continue;
            }
            if (fieldInfo.isReplicated()) {
                serializer.deserializeOnto(targetEvent, fieldInfo, new ProtobufPersistedData(eventData.getFieldValue(i)), deserializationContext);
            }
        }
        return targetEvent;
    }
View Full Code Here

Examples of org.terasology.persistence.typeHandling.Serializer.deserializeOnto()

            for (int fieldIndex = 0; fieldIndex < UnsignedBytes.toInt(entityData.getComponentFieldCounts().byteAt(componentIndex)); ++fieldIndex) {
                byte fieldId = entityData.getFieldIds().byteAt(fieldPos);
                ReplicatedFieldMetadata fieldMetadata = metadata.getField(fieldId);
                if (fieldMetadata != null && fieldCheck.shouldDeserialize(metadata, fieldMetadata)) {
                    logger.trace("Deserializing field {} of component {} as value {}", fieldMetadata, metadata, entityData.getFieldValue(fieldPos));
                    serializer.deserializeOnto(component, fieldMetadata, new ProtobufPersistedData(entityData.getFieldValue(fieldPos)), deserializationContext);
                }
                fieldPos++;
            }
            if (createdNewComponent) {
                entity.addComponent(component);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.