public class EPackageRegistryImpl extends java.util.HashMap<java.lang.String,java.lang.Object> implements EPackage.Registry
Modifier and Type | Class and Description |
---|---|
static class |
EPackageRegistryImpl.Delegator
A package registry implementation that delegates to a class loader specific registry.
|
Modifier and Type | Field and Description |
---|---|
protected static java.util.Map<java.lang.ClassLoader,EPackage.Registry> |
classLoaderToRegistryMap
A map from class loader to its associated registry.
|
protected EPackage.Registry |
delegateRegistry
The delegate registry.
|
INSTANCE
Constructor and Description |
---|
EPackageRegistryImpl()
Creates a non-delegating instance.
|
EPackageRegistryImpl(EPackage.Registry delegateRegistry)
Creates a delegating instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.Object key)
Returns whether this map or the delegate map contains this key.
|
static EPackage.Registry |
createGlobalRegistry()
Creates the
instance of the global registry. |
protected EFactory |
delegatedGetEFactory(java.lang.String nsURI)
Returns the factory from the delegate registry, if there is one.
|
protected EPackage |
delegatedGetEPackage(java.lang.String nsURI)
Returns the package from the delegate registry, if there is one.
|
EFactory |
getEFactory(java.lang.String nsURI)
Looks up the value in the map, converting
EPackage.Descriptor objects to EFactory objects on demand. |
EPackage |
getEPackage(java.lang.String nsURI)
Looks up the value in the map, converting
EPackage.Descriptor objects to EPackage objects on demand. |
static EPackage.Registry |
getRegistry(java.lang.ClassLoader classLoader)
Returns the package registry associated with the given class loader.
|
protected void |
initialize(EPackage ePackage)
Creates a delegating instance.
|
clear, clone, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
protected EPackage.Registry delegateRegistry
protected static java.util.Map<java.lang.ClassLoader,EPackage.Registry> classLoaderToRegistryMap
public EPackageRegistryImpl()
public EPackageRegistryImpl(EPackage.Registry delegateRegistry)
public static EPackage.Registry createGlobalRegistry()
instance
of the global registry.
If a security manager
is active,
and "classLoader"
permission
is not granted,
a secure delegator instance is created,
i.e., a private registry implementation that securely accesses class loaders
and keeps them private, will be used.public EPackage getEPackage(java.lang.String nsURI)
EPackage.Registry
EPackage.Descriptor
objects to EPackage
objects on demand.getEPackage
in interface EPackage.Registry
public EFactory getEFactory(java.lang.String nsURI)
EPackage.Registry
EPackage.Descriptor
objects to EFactory
objects on demand.getEFactory
in interface EPackage.Registry
protected void initialize(EPackage ePackage)
protected EPackage delegatedGetEPackage(java.lang.String nsURI)
protected EFactory delegatedGetEFactory(java.lang.String nsURI)
public boolean containsKey(java.lang.Object key)
keySet().contains(key)
.containsKey
in interface java.util.Map<java.lang.String,java.lang.Object>
containsKey
in class java.util.HashMap<java.lang.String,java.lang.Object>
key
- the key whose presence in this map is to be tested.public static EPackage.Registry getRegistry(java.lang.ClassLoader classLoader)
classLoader
- the class loader.