First of the .*iml files do not have anything to do with your code. It is only a file created by the IDE to contain module information.

If you are using maven you can reimport your projects modules as follows:
Go to File > Project Structures > Modules > Add > Import Modules > > OK.

After that you have to go to the maven Tool window and click on the reimport button.

Deleted .iml File in IntelliJ

Unfortunately i somehow deleted my Applications .iml file. Now my Project somehow seems broken because my modules are not displayed anymore.
Subscribe to .iml-file