![JAR search and dependency download from the Maven repository](/logo.png)
net.dongliu.prettypb.runtime.code.object.MessageProtoFieldInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prettypb-runtime Show documentation
Show all versions of prettypb-runtime Show documentation
Prettypb serialization runtime
package net.dongliu.prettypb.runtime.code.object;
import net.dongliu.prettypb.runtime.ExtensionRegistry;
import net.dongliu.prettypb.runtime.ProtoBufDecoder;
import net.dongliu.prettypb.runtime.ProtoBufEncoder;
import net.dongliu.prettypb.runtime.code.ProtoBufReader;
import net.dongliu.prettypb.runtime.include.ProtoField;
import net.dongliu.prettypb.runtime.include.ProtoType;
import net.dongliu.prettypb.runtime.code.ProtoBufWriter;
import net.dongliu.prettypb.runtime.code.ObjectProtoFieldInfo;
import java.io.IOException;
import java.lang.reflect.Field;
/**
* @author Dong Liu
*/
public class MessageProtoFieldInfo extends ObjectProtoFieldInfo {
public MessageProtoFieldInfo(Field field, Field helperField, ProtoField protoField) {
super(field, helperField, protoField);
}
@Override
protected void serializeFieldInternal(Object value, ProtoBufWriter protoBufWriter)
throws IOException {
protoBufWriter.encodeTag(ProtoType.Message, idx());
protoBufWriter.writeBytes(ProtoBufEncoder.toBytes(value, (Class
© 2015 - 2025 Weber Informatics LLC | Privacy Policy