Java ModuleDescriptor.Builder: whats the purpose?

Viewed 107

Using ModuleDescriptor.Builder I can build ModuleDescriptors. I can also read ModuleDescriptors from files. The only thing missing now is Writing ModuleDescriptors to files.

After building my ModuleDescriptor using the builder what am I supposed to do with it?. I have gone through every class that deals with module data in the jdk. From the java.lang.module package to all the class in the java.lang package and all these class provides me a getter method to retrieve the module descriptor but no setter method nor constructor to use moduleDescriptor as a parameter .

If there was a way to write an module descriptor to an file then the Builder class would have been of a great service as my netbeans ide seems to not be able to add version or main class info to my module. But since there is none.

What purpose does ModuleBuilder serve?

0 Answers
Related