Interface SerializationContextInitializer

  • All Known Subinterfaces:
    GeneratedSchema

    public interface SerializationContextInitializer
    An interface to be used in conjunction with the AutoProtoSchemaBuilder annotation. By creating an abstract class implementing this interface or an interface extending it and annotating it with AutoProtoSchemaBuilder the compiler (via a custom annotation processor) will generate a concrete implementation for you to use. The implementation will provide a single schema file that is generated based on the annotations and also marshallers for all the contained types.

    You can also use the sub-interface GeneratedSchema instead, which provides methods to access the generated schema file.

    Manually written implementations of these interfaces are allowed, but are of no special use with regard to ProtoStream library.

    This mechanism is very similar to ProtoSchemaBuilder which works using bytecode generation at runtime instead of compile time.

    NOTE: Methods getProtoFileName() and getProtoFile() will be removed from this interface in ver. 5 but will continue to exist in GeneratedSchema, which extends this interface.

    Since:
    4.3
    Author:
    anistor@redhat.com