0
votes

Given an arbitrary .proto file, is it possible to parse it such that I can get all the messages defined using Java?

I know that I can create the source code using protoc and use reflection to get all the info I need but I want to avoid having to compile it.

1
You can try to parse it as text file, by looking for certain words - lczapski

1 Answers

0
votes

I ended up using the --descriptor_set_out then used DescriptorProtos.FileDescriptorSet to create a FileDescriptor and this allowed me to use reflection to parse the file.