public class ResourceHandlerRegistry
extends java.lang.Object
addHandlerType(String, Class)
the registry can be
configured which type of ResourceHandle is to be created for which namespace URI.Modifier and Type | Class and Description |
---|---|
protected class |
ResourceHandlerRegistry.ResourceHandlerDescriptor |
Modifier and Type | Field and Description |
---|---|
static ResourceHandlerRegistry |
INSTANCE
Singleton instance.
|
Constructor and Description |
---|
ResourceHandlerRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
addHandlerType(java.lang.String nsURIPattern,
java.lang.Class<? extends org.eclipse.emf.ecore.xmi.XMLResource.ResourceHandler> handlerType)
Registers a ResourceHandler type with namespaces.
|
protected java.util.List<ResourceHandlerRegistry.ResourceHandlerDescriptor> |
getDescriptors() |
org.eclipse.emf.ecore.xmi.XMLResource.ResourceHandler |
getHandler(java.lang.String nsURI)
Creates a ResourceHandler of the type registered for the given namespace URI.
|
public static final ResourceHandlerRegistry INSTANCE
protected java.util.List<ResourceHandlerRegistry.ResourceHandlerDescriptor> getDescriptors()
public org.eclipse.emf.ecore.xmi.XMLResource.ResourceHandler getHandler(java.lang.String nsURI)
nsURI
- The URI of the namespace for which a ResourceHandler is to be retrieved.addHandlerType(String, Class)
public void addHandlerType(java.lang.String nsURIPattern, java.lang.Class<? extends org.eclipse.emf.ecore.xmi.XMLResource.ResourceHandler> handlerType)
getHandler(String)
is called with a namespace URI matching the namespace URI pattern passed to this
method.nsURIPattern
- A namespace URI pattern describing for which namespaces a ResourceHandler of the given type is to be
returned.handlerType
- The type of ResourceHandler which is to be created for the specified namespaces.getHandler(String)