Package org.jvnet.hk2.metadata.tests
Class FactoryWithRanks
java.lang.Object
org.jvnet.hk2.metadata.tests.FactoryWithRanks
- All Implemented Interfaces:
Factory<SimpleInterface>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose
(SimpleInterface instance) This method will dispose of objects created with this scope.provide()
This method will create instances of the type of this factory.
-
Constructor Details
-
FactoryWithRanks
public FactoryWithRanks()
-
-
Method Details
-
provide
Description copied from interface:Factory
This method will create instances of the type of this factory. The provide method must be annotated with the desired scope and qualifiers.- Specified by:
provide
in interfaceFactory<SimpleInterface>
- Returns:
- The produces object
-
dispose
Description copied from interface:Factory
This method will dispose of objects created with this scope. This method should not be annotated, as it is naturally paired with the provide method- Specified by:
dispose
in interfaceFactory<SimpleInterface>
- Parameters:
instance
- The instance to dispose of
-