I googled this and found questions like "How to use Protobuf message as java class without a java outer class?" ( https://stackoverflow.com/questions/60312156/how-to-use-protobuf-message-as-java-class-without-a-java-outer-class) which talk about how one might tweak their Protobuf Java code generation. For example, that person wants to avoid having outer classes. The answer tells them about the "multiple files" option.
But I'd like to know why the Java generated code, by default, is split up this way. I didn't notice code split up like that when I used my same Protobuf files to generate Go code. I got just one struct per Protobuf message I defined. In Java, I get two classes per Protobuf message defined, and I can choose between them being nested or in separate files. Why? -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/8e10682a-ad04-48bc-933b-5f30691dd7b8n%40googlegroups.com.