Module org.glassfish.hk2.extras
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
Specifies who is responsible for the disposal of instances of a service.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe instance of the service that is provided is responsible for its own disposal.The instance or class that provides the service — the one declaring the method annotated withProvides— is responsible for the disposal of instances of the provided service. -
Method Summary
Modifier and TypeMethodDescriptionstatic Provides.DisposalHandledByReturns the enum constant of this class with the specified name.static Provides.DisposalHandledBy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
The instance or class that provides the service — the one declaring the method annotated withProvides— 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
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
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 nameNullPointerException- if the argument is null
-