Package org.glassfish.hk2.bootstrap
Class HK2Populator
java.lang.Object
org.glassfish.hk2.bootstrap.HK2Populator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
populate
(ServiceLocator serviceLocator) This method can be used to populate the service locator with files that have been written out using theDescriptorImpl
writeObject method, looking in the classpath to locate these filesstatic List
<ActiveDescriptor> populate
(ServiceLocator serviceLocator, DescriptorFileFinder fileFinder, List<? extends PopulatorPostProcessor> postProcessors) This method can be used to populate the service locator with files that have been written out using theDescriptorImpl
writeObject method.static void
populateConfig
(ServiceLocator serviceLocator)
-
Constructor Details
-
HK2Populator
public HK2Populator()
-
-
Method Details
-
populate
public static List<ActiveDescriptor> populate(ServiceLocator serviceLocator, DescriptorFileFinder fileFinder, List<? extends PopulatorPostProcessor> postProcessors) throws IOException This method can be used to populate the service locator with files that have been written out using theDescriptorImpl
writeObject method.- Parameters:
serviceLocator
- The service locator to populate. May not be null.fileFinder
- An object that finds files in the environment. May not be null.postProcessors
- A post-processor that allows the environment to modify the set of descriptors that are added to the system. May be null, in which case the descriptors read in are those that are used to populate the serviceLocator- Throws:
IOException
- In case of an error
-
populate
This method can be used to populate the service locator with files that have been written out using theDescriptorImpl
writeObject method, looking in the classpath to locate these files- Parameters:
serviceLocator
- The service locator to populate. May not be null- Throws:
IOException
- In case of an error
-
populateConfig
- Throws:
BootException
-