Package protopoet

Class 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
    • Method Detail

      • messageOption

        public static OptionSpec.Builder messageOption​(java.lang.String optionName)
        Creates a builder for a Message OptionSpec.
      • enumValueOption

        public static OptionSpec.Builder enumValueOption​(java.lang.String optionName)
        Creates a builder for a Enum Value OptionSpec.
      • serviceOption

        public static OptionSpec.Builder serviceOption​(java.lang.String optionName)
        Creates a builder for a Service OptionSpec.
      • emit

        public void emit​(protopoet.ProtoWriter writer)
                  throws java.io.IOException
        Throws:
        java.io.IOException