Package org.jvnet.hk2.internal
Class PopulatorImpl
- java.lang.Object
-
- org.jvnet.hk2.internal.PopulatorImpl
-
-
Field Summary
Fields Modifier and Type Field Description private DynamicConfigurationService
dcs
private ServiceLocator
serviceLocator
-
Constructor Summary
Constructors Constructor Description PopulatorImpl(ServiceLocator serviceLocator, DynamicConfigurationService dcs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ActiveDescriptor<?>>
populate()
This method will populate the service locator using the system classloader to find the hk2-locator files from the default location of META-INF/hk2-locator/default.java.util.List<ActiveDescriptor<?>>
populate(DescriptorFileFinder fileFinder, PopulatorPostProcessor... postProcessors)
This method can be used to populate the service locator with files that have been written out using theDescriptorImpl
writeObject method.
-
-
-
Field Detail
-
serviceLocator
private final ServiceLocator serviceLocator
-
dcs
private final DynamicConfigurationService dcs
-
-
Constructor Detail
-
PopulatorImpl
PopulatorImpl(ServiceLocator serviceLocator, DynamicConfigurationService dcs)
-
-
Method Detail
-
populate
public java.util.List<ActiveDescriptor<?>> populate(DescriptorFileFinder fileFinder, PopulatorPostProcessor... postProcessors) throws java.io.IOException
Description copied from interface:Populator
This method can be used to populate the service locator with files that have been written out using theDescriptorImpl
writeObject method.- Specified by:
populate
in interfacePopulator
- Parameters:
fileFinder
- An object that finds files in the environment. If this is null then the system will look in the service locator for an implementation of DescriptorFileFinder. If one is still not find this service will return an empty listpostProcessors
- post-processors that allows the environment to modify the set of descriptors that are added to the system.- Returns:
- The list of descriptors added to the system. Will not return null, but may return an empty list
- Throws:
java.io.IOException
- In case of an error reading the input streams
-
populate
public java.util.List<ActiveDescriptor<?>> populate() throws java.io.IOException
Description copied from interface:Populator
This method will populate the service locator using the system classloader to find the hk2-locator files from the default location of META-INF/hk2-locator/default. No post processing will be done on the descriptors added to the system
-
-