public final class ModuleMetadata
extends java.lang.Object
implements java.io.Serializable
Module
.
A Service implementation is identified by the service interface it implements, the implementation class of that service interface and the module in which that implementation resides.
Note that since a single ModuleDefinition
is allowed to be used
in multiple Module
s, this class may not reference anything Module
specific.
Modifier and Type | Class and Description |
---|---|
static class |
ModuleMetadata.Entry |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.util.List<Descriptor>> |
descriptors
META-INF/hk2-locator/* cache
|
private java.util.Map<java.lang.String,ModuleMetadata.Entry> |
entries
ModuleMetadata.Entry s keyed by the service name. |
private static ModuleMetadata.Entry |
NULL_ENTRY
Empty Entry used to indicate that there's no service.
|
Constructor and Description |
---|
ModuleMetadata() |
Modifier and Type | Method and Description |
---|---|
void |
addDescriptors(java.lang.String serviceLocatorName,
java.util.Collection<Descriptor> descriptorsToAdd) |
java.util.Map<java.lang.String,java.util.List<Descriptor>> |
getDescriptors() |
java.util.List<java.net.URL> |
getDescriptors(java.lang.String serviceName) |
java.lang.Iterable<ModuleMetadata.Entry> |
getEntries() |
ModuleMetadata.Entry |
getEntry(java.lang.String serviceName) |
void |
load(java.net.URL source,
java.lang.String serviceName) |
void |
load(java.net.URL source,
java.lang.String serviceName,
java.io.InputStream is) |
private java.util.Map<java.lang.String,java.util.List<Descriptor>> descriptors
private final java.util.Map<java.lang.String,ModuleMetadata.Entry> entries
ModuleMetadata.Entry
s keyed by the service name.private static final ModuleMetadata.Entry NULL_ENTRY
public java.util.Map<java.lang.String,java.util.List<Descriptor>> getDescriptors()
public void addDescriptors(java.lang.String serviceLocatorName, java.util.Collection<Descriptor> descriptorsToAdd)
public ModuleMetadata.Entry getEntry(java.lang.String serviceName)
public java.lang.Iterable<ModuleMetadata.Entry> getEntries()
public java.util.List<java.net.URL> getDescriptors(java.lang.String serviceName)
public void load(java.net.URL source, java.lang.String serviceName) throws java.io.IOException
java.io.IOException
public void load(java.net.URL source, java.lang.String serviceName, java.io.InputStream is) throws java.io.IOException
java.io.IOException