Cross-posting from stackoverflow
I have a proto definition with nested classes
When I generate the java classes with option java_multiple_files = false; it creates a single java class, ClusterConfigOuterClass.java with all the Java classes/enums/etc generated for the top-level messages, services, and enumerations nested inside it. This is expected.
But if I use option java_multiple_files = true; then I am seeing it is generating two additional classes ClusterConfig.java, ClusterConfigOrBuilder.java along with ClusterConfigOuterClass.java. ClusteConfig.java now contains the nested classes.
The documentation states like below:-
java_multiple_files (file option): If false, only a single .java file will be generated for this .proto file, and all the Java classes/enums/etc. generated for the top-level messages, services, and enumerations will be nested inside of an outer class (see java_outer_classname). If true, separate .java files will be generated for each of the Java classes/enums/etc. generated for the top-level messages, services, and enumerations, and the wrapper Java class generated for this .proto file won't contain any nested classes/enums/etc. This is a Boolean option that defaults to false. If not generating Java code, this option has no effect.
So should not each nested message like Kafka, Network, etc go into a separate java file?