Skip to content

Configurations

Stéphane Nicolas edited this page May 16, 2016 · 19 revisions

Configuration class

The class toothpick.Configuration allows to change Toothpick internal behaviors.

This wiki page will not detail in much length all possible configurations, we simply invite developers to browse the javadoc of this class to get more details. The documentation is available on maven central and your IDE should let you browse it during edition of java source files.

One word on reflection

Toothpick is completely reflection free. But not by default.

By default Toothpick will use a very limited amount of reflection to:

  • load factories
  • load member injectors

This setting allow to get started faster. Though, for those who are interested in getting a slight performance increase, Toothpick also provides a reflectionFree configuration based on registries to load both factories and injectors. In this more advanced configuration, Toothpick works without using any reflection code at all.

To enable this configuration, developers will have to setup their registries locations correctly for each compile unit as detailed in Registries.

Benchmark of reflection vs registries

TODO