So the issue I am having is that I am parsing the descriptor files at runtime, I don't have access to the proto class therefore I can't call YourProtoFile.registerAllExtensions. Here is how I am reading the descriptor file and getting the FileDescriptor:
// Open test.desc and get the FileDescriptorSet
FileInputStream fin = new FileInputStream("/path/to/test.desc");
FileDescriptorSet set = FileDescriptorSet.parseFrom(fin);
// This loop handles my imports
List<FileDescriptor> fileDescriptors = new ArrayList<>();
for(int i=0; i<set.getFileCount;i++){
fileDescriptors.add(FileDescriptor.buildFrom(set.getFile(i), new FileDescriptor[] {})));
}
// Get the FileDescriptor
FileDescriptor descriptor = FileDescriptor.buildFrom(set.getFile(set.getFileCount()-1), fileDescriptors.toArray(new FileDescriptor[0]));