Class GeneratedMessage

All Implemented Interfaces:
Message, MessageLite, MessageLiteOrBuilder, MessageOrBuilder, Serializable
Direct Known Subclasses:
DescriptorProtos.DescriptorProto, DescriptorProtos.DescriptorProto.ExtensionRange, DescriptorProtos.EnumDescriptorProto, DescriptorProtos.EnumValueDescriptorProto, DescriptorProtos.FieldDescriptorProto, DescriptorProtos.FileDescriptorProto, DescriptorProtos.FileDescriptorSet, DescriptorProtos.MethodDescriptorProto, DescriptorProtos.OneofDescriptorProto, DescriptorProtos.ServiceDescriptorProto, DescriptorProtos.SourceCodeInfo, DescriptorProtos.SourceCodeInfo.Location, DescriptorProtos.UninterpretedOption, DescriptorProtos.UninterpretedOption.NamePart, GeneratedMessage.ExtendableMessage

public abstract class GeneratedMessage extends AbstractMessage implements Serializable
All generated protocol message classes extend this class. This class implements most of the Message and Builder interfaces using Java reflection. Users can ignore this class and pretend that generated messages implement the Message interface directly.
Author:
kenton@google.com Kenton Varda
See Also:
  • Field Details

    • alwaysUseFieldBuilders

      protected static boolean alwaysUseFieldBuilders
      For testing. Allows a test to disable the optimization that avoids using field builders for nested messages until they are requested. By disabling this optimization, existing tests can be reused to test the field builders.
  • Constructor Details

    • GeneratedMessage

      protected GeneratedMessage()
    • GeneratedMessage

      protected GeneratedMessage(GeneratedMessage.Builder<?> builder)
  • Method Details