public final class ProtoSchemaBuilder extends Object
ProtoMessage
, ProtoField
, ProtoEnum
, ProtoEnumValue
and ProtoUnknownFieldSet
.Modifier and Type | Field and Description |
---|---|
static boolean |
generateSchemaDebugComments
Set this to
true to enable output of debug comments in the generated protobuf schema. |
Constructor and Description |
---|
ProtoSchemaBuilder() |
Modifier and Type | Method and Description |
---|---|
ProtoSchemaBuilder |
addClass(Class<?> clazz) |
String |
build(SerializationContext serializationContext)
Builds the Protocol Buffers schema file and marshallers and registers them with the given
SerializationContext . |
ProtoSchemaBuilder |
fileName(String fileName) |
static void |
main(String[] args) |
ProtoSchemaBuilder |
packageName(String packageName) |
public static boolean generateSchemaDebugComments
true
to enable output of debug comments in the generated protobuf schema.public ProtoSchemaBuilder fileName(String fileName)
public ProtoSchemaBuilder packageName(String packageName)
public ProtoSchemaBuilder addClass(Class<?> clazz)
public String build(SerializationContext serializationContext) throws ProtoSchemaBuilderException, IOException
SerializationContext
.serializationContext
- ProtoSchemaBuilderException
IOException
Copyright © 2016 JBoss, a division of Red Hat. All rights reserved.