Actually, there is. It is not documented, but you can add a line to your .proto file as follows:
option java_multiple_files = true;
This will put each type of top-level message from the .proto file into an independent .java file. Note that you, of course, will have to update all your code to import these classes from their new places. Note also that protoc will still generate the βexternalβ class that it did before, without the internal classes nested inside it. The outer class is still suitable for receiving a file descriptor, top-level extension, and other non-classical objects.
All that said, if you have a .proto file that is large, I highly recommend .proto file .proto into smaller files that import each other.
source share