@Override public List<ActiveDescriptor<?>> populate() throws IOException { return populate(new ClasspathDescriptorFileFinder()); }
/** * This method can be used to populate the service locator with files that * have been written out using the {@link DescriptorImpl} writeObject method, * looking in the classpath to locate these files * * @param serviceLocator The service locator to populate. May not be null * @throws IOException In case of an error */ public static void populate(final ServiceLocator serviceLocator) throws IOException { populate(serviceLocator, new ClasspathDescriptorFileFinder(), null); }
/** * This method can be used to populate the service locator with files that * have been written out using the {@link DescriptorImpl} writeObject method, * looking in the classpath to locate these files * * @param serviceLocator The service locator to populate. May not be null * @throws IOException In case of an error */ public static void populate(final ServiceLocator serviceLocator) throws IOException { populate(serviceLocator, new ClasspathDescriptorFileFinder(), null); }
@Override public List<ActiveDescriptor<?>> populate() throws IOException { return populate(new ClasspathDescriptorFileFinder()); }
@Override public List<ActiveDescriptor<?>> populate() throws IOException { return populate(new ClasspathDescriptorFileFinder()); }
@Override public List<ActiveDescriptor<?>> populate() throws IOException { return populate(new ClasspathDescriptorFileFinder()); }
public void populate(ServiceLocator locator) throws Exception { DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class); Populator populator = dcs.getPopulator(); populator.populate(new ClasspathDescriptorFileFinder(getClass().getClassLoader())); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected List<ActiveDescriptor> parseInhabitants(Module module, String name, ServiceLocator serviceLocator, List<PopulatorPostProcessor> postProcessors) throws IOException { ArrayList<PopulatorPostProcessor> allPostProcessors = new ArrayList<PopulatorPostProcessor>(); allPostProcessors.add(new Hk2LoaderPopulatorPostProcessor(singleClassLoader)); if (postProcessors != null) { allPostProcessors.addAll(postProcessors); } DynamicConfigurationService dcs = serviceLocator.getService(DynamicConfigurationService.class); Populator populator = dcs.getPopulator(); List<ActiveDescriptor<?>> retVal = populator.populate( new ClasspathDescriptorFileFinder(singleClassLoader, name), allPostProcessors.toArray(new PopulatorPostProcessor[allPostProcessors.size()])); return (List<ActiveDescriptor>) ((List) retVal); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected List<ActiveDescriptor> parseInhabitants(Module module, String name, ServiceLocator serviceLocator, List<PopulatorPostProcessor> postProcessors) throws IOException { ArrayList<PopulatorPostProcessor> allPostProcessors = new ArrayList<PopulatorPostProcessor>(); allPostProcessors.add(new Hk2LoaderPopulatorPostProcessor(singleClassLoader)); if (postProcessors != null) { allPostProcessors.addAll(postProcessors); } DynamicConfigurationService dcs = serviceLocator.getService(DynamicConfigurationService.class); Populator populator = dcs.getPopulator(); List<ActiveDescriptor<?>> retVal = populator.populate( new ClasspathDescriptorFileFinder(singleClassLoader, name), allPostProcessors.toArray(new PopulatorPostProcessor[allPostProcessors.size()])); return (List<ActiveDescriptor>) ((List) retVal); }