Class AbstractMarshallerCodeGenerator
- java.lang.Object
-
- org.infinispan.protostream.annotations.impl.AbstractMarshallerCodeGenerator
-
public abstract class AbstractMarshallerCodeGenerator extends Object
- Since:
- 4.3
- Author:
- [email protected]
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
BRIDGE_FIELD_NAME
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMarshallerCodeGenerator(XTypeFactory typeFactory, String protobufSchemaPackage)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
generateEnumDecodeMethodBody(ProtoEnumTypeMetadata enumTypeMetadata)
protected String
generateEnumEncodeMethodBody(ProtoEnumTypeMetadata enumTypeMetadata)
abstract void
generateMarshaller(SerializationContext serCtx, ProtoTypeMetadata ptm)
protected String
generateReadFromMethodBody(ProtoMessageTypeMetadata messageTypeMetadata)
Signature of generated method is:public java.lang.Object readFrom(org.infinispan.protostream.ImmutableSerializationContext $1, org.infinispan.protostream.RawProtoStreamReader $2) throws java.io.IOException
protected String
generateWriteToMethodBody(ProtoMessageTypeMetadata messageTypeMetadata)
Signature of generated method is:public void writeTo(org.infinispan.protostream.ImmutableSerializationContext $1, org.infinispan.protostream.RawProtoStreamWriter $2, java.lang.Object $3) throws java.io.IOException
protected String
makeMarshallerDelegateFieldName(ProtoFieldMetadata field)
Make field name for caching a marshaller delegate for a related message.protected String
makeQualifiedTypeName(String fullName)
Returns the protobuf qualified type name, including the package name.
-
-
-
Field Detail
-
BRIDGE_FIELD_NAME
protected static final String BRIDGE_FIELD_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractMarshallerCodeGenerator
protected AbstractMarshallerCodeGenerator(XTypeFactory typeFactory, String protobufSchemaPackage)
-
-
Method Detail
-
generateEnumDecodeMethodBody
protected String generateEnumDecodeMethodBody(ProtoEnumTypeMetadata enumTypeMetadata)
-
generateEnumEncodeMethodBody
protected String generateEnumEncodeMethodBody(ProtoEnumTypeMetadata enumTypeMetadata)
-
makeQualifiedTypeName
protected String makeQualifiedTypeName(String fullName)
Returns the protobuf qualified type name, including the package name.
-
makeMarshallerDelegateFieldName
protected String makeMarshallerDelegateFieldName(ProtoFieldMetadata field)
Make field name for caching a marshaller delegate for a related message.
-
generateReadFromMethodBody
protected String generateReadFromMethodBody(ProtoMessageTypeMetadata messageTypeMetadata)
Signature of generated method is:public java.lang.Object readFrom(org.infinispan.protostream.ImmutableSerializationContext $1, org.infinispan.protostream.RawProtoStreamReader $2) throws java.io.IOException
-
generateWriteToMethodBody
protected String generateWriteToMethodBody(ProtoMessageTypeMetadata messageTypeMetadata)
Signature of generated method is:public void writeTo(org.infinispan.protostream.ImmutableSerializationContext $1, org.infinispan.protostream.RawProtoStreamWriter $2, java.lang.Object $3) throws java.io.IOException
-
generateMarshaller
public abstract void generateMarshaller(SerializationContext serCtx, ProtoTypeMetadata ptm) throws Exception
- Throws:
Exception
-
-