Modifier and Type | Method and Description |
---|---|
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.
|
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 the
DescriptorImpl writeObject method. |
public List<ActiveDescriptor<?>> populate(DescriptorFileFinder fileFinder, PopulatorPostProcessor... postProcessors) throws IOException
Populator
DescriptorImpl
writeObject method.populate
in interface Populator
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.IOException
- In case of an error reading the input streamspublic List<ActiveDescriptor<?>> populate() throws IOException
Populator
populate
in interface Populator
IOException
- if there was an error reading any of the descriptorsCopyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.