public final class ProtoSchemaBuilder
extends java.lang.Object
ProtoMessage, ProtoField, ProtoEnum, ProtoEnumValue and ProtoUnknownFieldSet.| Modifier and Type | Field and Description |
|---|---|
private java.util.Set<java.lang.Class<?>> |
classes |
private java.lang.String |
fileName |
static boolean |
generateSchemaDebugComments
Set this to
true to enable output of debug comments in the generated protobuf schema. |
private java.lang.String |
packageName |
| Constructor and Description |
|---|
ProtoSchemaBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ProtoSchemaBuilder |
addClass(java.lang.Class<?> clazz) |
java.lang.String |
build(SerializationContext serializationContext)
Builds the Protocol Buffers schema file and marshallers and registers them with the given
SerializationContext. |
ProtoSchemaBuilder |
fileName(java.lang.String fileName) |
static void |
main(java.lang.String[] args) |
ProtoSchemaBuilder |
packageName(java.lang.String packageName) |
public static boolean generateSchemaDebugComments
true to enable output of debug comments in the generated protobuf schema.private java.lang.String fileName
private java.lang.String packageName
private final java.util.Set<java.lang.Class<?>> classes
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionpublic ProtoSchemaBuilder fileName(java.lang.String fileName)
public ProtoSchemaBuilder packageName(java.lang.String packageName)
public ProtoSchemaBuilder addClass(java.lang.Class<?> clazz)
public java.lang.String build(SerializationContext serializationContext) throws ProtoSchemaBuilderException, java.io.IOException
SerializationContext.serializationContext - ProtoSchemaBuilderExceptionjava.io.IOException