Package protopoet
Class OptionSpec
- java.lang.Object
-
- protopoet.OptionSpec
-
- All Implemented Interfaces:
Buildable<OptionSpec>
public final class OptionSpec extends java.lang.Object implements Buildable<OptionSpec>
Models an Option in the Protocol Buffers language. Learn more: https://developers.google.com/protocol-buffers/docs/proto#options
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OptionSpec.Builder
Builder for producing new instances ofOptionSpec
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OptionSpec
build()
Returns a built instance of the declared type.void
emit(protopoet.ProtoWriter writer)
static OptionSpec.Builder
enumOption(java.lang.String optionName)
Creates a builder for a EnumOptionSpec
.static OptionSpec.Builder
enumValueOption(java.lang.String optionName)
Creates a builder for a Enum ValueOptionSpec
.static OptionSpec.Builder
fieldOption(java.lang.String optionName)
Creates a builder for a FieldOptionSpec
.static OptionSpec.Builder
fileOption(java.lang.String optionName)
Creates a builder for a FileOptionSpec
.static OptionSpec.Builder
messageOption(java.lang.String optionName)
Creates a builder for a MessageOptionSpec
.static OptionSpec.Builder
methodOption(java.lang.String optionName)
Creates a builder for a MethodOptionSpec
.static OptionSpec.Builder
oneofOption(java.lang.String optionName)
Creates a builder for a OneofOptionSpec
.static OptionSpec.Builder
serviceOption(java.lang.String optionName)
Creates a builder for a ServiceOptionSpec
.
-
-
-
Method Detail
-
fileOption
public static OptionSpec.Builder fileOption(java.lang.String optionName)
Creates a builder for a FileOptionSpec
.
-
messageOption
public static OptionSpec.Builder messageOption(java.lang.String optionName)
Creates a builder for a MessageOptionSpec
.
-
fieldOption
public static OptionSpec.Builder fieldOption(java.lang.String optionName)
Creates a builder for a FieldOptionSpec
.
-
enumOption
public static OptionSpec.Builder enumOption(java.lang.String optionName)
Creates a builder for a EnumOptionSpec
.
-
enumValueOption
public static OptionSpec.Builder enumValueOption(java.lang.String optionName)
Creates a builder for a Enum ValueOptionSpec
.
-
serviceOption
public static OptionSpec.Builder serviceOption(java.lang.String optionName)
Creates a builder for a ServiceOptionSpec
.
-
oneofOption
public static OptionSpec.Builder oneofOption(java.lang.String optionName)
Creates a builder for a OneofOptionSpec
.
-
methodOption
public static OptionSpec.Builder methodOption(java.lang.String optionName)
Creates a builder for a MethodOptionSpec
.
-
emit
public void emit(protopoet.ProtoWriter writer) throws java.io.IOException
- Throws:
java.io.IOException
-
build
public OptionSpec build()
Description copied from interface:Buildable
Returns a built instance of the declared type.- Specified by:
build
in interfaceBuildable<OptionSpec>
-
-