Skip to content

Removing Reflexion

I removed completely reflexion from the project. I decided that i would overwrite AppsLoader.defaultClasses just before running the web application.

Using this object in a new file AllApps.scala :

object AllApps {
  val all: List[Class[?]] = List(
    classOf[_root_.apps.app10.Logic],
    classOf[_root_.apps.app100.Logic],
    classOf[_root_.apps.app101.Logic],...)
    
  def register(): Unit = {
    AppsLoader.defaultClasses = all
  }
}

With this call in MainJVM.scala:

object MainJVM extends ApplicationJVM:
  AllApps.register()
  this.start()

The pipeline would be:

  • First compilation for a first .jar
  • Bytecode analysis to extract all the StateMachines
  • Creation of AllApps.scala which store all the class instances and the register function
  • AllApps will be automatically be taken into account if it exist, else it will be an empty webapp list.
  • Second compilation for the final deployment
Edited by François Henri Théron

Merge request reports

Loading