org.eclipse.mylyn.wikitext.core.util
Class ServiceLocator
java.lang.Object
org.eclipse.mylyn.wikitext.core.util.ServiceLocator
public class ServiceLocator
- extends Object
A service locator for use both inside and outside of an Eclipse environment. Provides access to markup languages by
name.
- Since:
- 1.0
- Author:
- David Green
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
classLoader
protected final ClassLoader classLoader
ServiceLocator
protected ServiceLocator(ClassLoader classLoader)
getInstance
public static ServiceLocator getInstance(ClassLoader classLoader)
- Get an instance of the service locator
- Parameters:
classLoader
- the class loader to use when looking up services- See Also:
getInstance()
getInstance
public static ServiceLocator getInstance()
- Get an instance of the service locator
- See Also:
getInstance(ClassLoader)
getMarkupLanguage
public MarkupLanguage getMarkupLanguage(String languageName)
throws IllegalArgumentException
- get a markup language by name
- Parameters:
languageName
- the name
of the markup language, or the fully qualified name of the
class that implements the language
- Returns:
- the language implementation
- Throws:
IllegalArgumentException
- if the provided language name is null or if no implementation is available for the given language
setImplementation
public static void setImplementation(Class<? extends ServiceLocator> implementationClass)
Copyright © 2011 FuseSource, Corp.. All Rights Reserved.