Annotation Interface EagerSingleton


@Target(TYPE) @Retention(RUNTIME) public @interface EagerSingleton
A class with this annotation will automatically be eagerly bound in the guice environment.
Unless inTests() is set to true, this will be ignored within environments built for unit tests.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    If true, the binding will be marked as an eager singleton even during testing.
  • Element Details

    • inTests

      boolean inTests
      If true, the binding will be marked as an eager singleton even during testing.
      Returns:
      Default:
      false