Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.cognifide.slice.commons;
 
 import java.util.List;
 
 
Factory for all Slice-related modules. It should be used in application's activator to register Slice-related modules

Author(s):
maciej.majchrzak
public class SliceModulesFactory {
	private SliceModulesFactory() {
	}

	public static List<ModulecreateModules(final BundleContext bundleContextfinal String injectorName,
			final String bundleNameFilterfinal String basePackage) {
		final ContextScope contextScope = new SliceContextScope();
		List<Modulemodules = new ArrayList<Module>();
		modules.add(Peaberry.osgiModule(bundleContext));
		modules.add(new SliceModule(injectorNamecontextScope));
		modules.add(new SlingModule(contextScope));
		modules.add(new JcrModule());
		modules.add(new LinkModule());
		modules.add(new ContextModule());
		modules.add(new SliceResourceModule(bundleContextbundleNameFilterbasePackage));
		return modules;
	}
New to GrepCode? Check out our FAQ X