Enum Lazy.Kind

java.lang.Object
java.lang.Enum<Lazy.Kind>
io.avaje.inject.Lazy.Kind
All Implemented Interfaces:
Serializable, Comparable<Lazy.Kind>
Enclosing class:
Lazy

public static enum Lazy.Kind extends Enum<Lazy.Kind>
Control whether a compile-time proxy is generated to support lazy initialization.

When using FORCE_PROXY a compile-time error will occur if the conditions for generating a proxy are not met (for example the class is final or has no no-args constructor). When using AUTO_PROXY a warning will be issued and lazy initialization will fall back to provider based lazy initialization.

When using PROVIDER no proxy is generated and lazy initialization is done via a provider.

  • Enum Constant Details

    • FORCE_PROXY

      public static final Lazy.Kind FORCE_PROXY
      Ensures that a compile-time proxy is generated, will fail compilation if missing conditions for generation
    • AUTO_PROXY

      public static final Lazy.Kind AUTO_PROXY
      Attempt compile-time proxy, will warn and fallback to provider compilation if missing conditions for generation
    • PROVIDER

      public static final Lazy.Kind PROVIDER
      No proxy, use a provider based lazy initialization
  • Method Details

    • values

      public static Lazy.Kind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Lazy.Kind valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null