- All Superinterfaces:
public interface GeneratedSchema extends SerializationContextInitializerAn annotation-based generated proto schema file. This is just a more specific flavour of
SerializationContextInitializerthat also exposes the generated Protobuf schema, which consists of the file name and the file contents. Users will never implement this interface directly. Implementations are always generated by the annotation processor based on the
AutoProtoSchemaBuilderannotation, identically as for
- [email protected]
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description
getProtoFile()Returns the contents of the proto file as a
getProtoFileName()Returns the name of the proto file.
getProtoFileReader()Convenience method to obtain a
Readerof the schema file contents.
String getProtoFileName()Returns the name of the proto file. The name is allowed to contain slashes so it can look like an absolute or relative path. The returned value must be the same (equals) on each invocation.
String getProtoFile() throws UncheckedIOExceptionReturns the contents of the proto file as a
String. The returned value must be guaranteed to be the same (equals) on each invocation. Implementations can return a constant or a value stored in memory but they are generally free to also retrieve it from somewhere else, including the classpath, the disk, or even a mechanism that can potentially fail with an