Enum Class Provides.DisposalHandledBy

java.lang.Object
java.lang.Enum<Provides.DisposalHandledBy>
org.glassfish.hk2.extras.provides.Provides.DisposalHandledBy
All Implemented Interfaces:
Serializable, Comparable<Provides.DisposalHandledBy>, Constable
Enclosing class:
Provides

public static enum Provides.DisposalHandledBy extends Enum<Provides.DisposalHandledBy>
Specifies who is responsible for the disposal of instances of a service.
  • Enum Constant Details

    • PROVIDED_INSTANCE

      public static final Provides.DisposalHandledBy PROVIDED_INSTANCE
      The instance of the service that is provided is responsible for its own disposal. Provides.disposeMethod() names a non-static, zero-parameter, public method of the provided service type.
    • PROVIDER

      public static final Provides.DisposalHandledBy PROVIDER
      The instance or class that provides the service — the one declaring the method annotated with Provides — is responsible for the disposal of instances of the provided service. Provides.disposeMethod() names a public method of the providing class where the type of the first parameter is a supertype of the provided service type. The remaining parameters are injection points for other services.
  • Method Details

    • values

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

      public static Provides.DisposalHandledBy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null