public class DefaultModuleDefinition extends Object implements ModuleDefinition
ModuleDefinition implementation that picks up most of the module
properties from the manifest file of the jar, as baked in by
the hk2-maven-plugin.| Modifier and Type | Field and Description |
|---|---|
protected List<URI> |
classPath |
protected List<ModuleDependency> |
dependencies |
protected Attributes |
mainAttributes
Main attributes section of the manifest.
|
| Constructor and Description |
|---|
DefaultModuleDefinition(File location)
TO DO need to support a URI constructor
|
DefaultModuleDefinition(File location,
Attributes attr) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
decorateClassPath(String classpathElement)
Extension point to manipulate the classpath element before it's parsed.
|
ModuleDependency[] |
getDependencies()
Returns the list of module dependencies
|
String |
getImportPolicyClassName()
Returns the class name implementing the
ImportPolicy interface for this module or
null if there is no such implementation |
String |
getLifecyclePolicyClassName()
Returns the class name implementing the
LifecyclePolicy interface for this module or
null if there is no such implementation |
URI[] |
getLocations()
Returns the list of URI locations forming the classpath for this module.
|
Manifest |
getManifest()
Returns the manifest file from the module's implementation jar file
|
ModuleMetadata |
getMetadata()
Gets the metadata that describes various components and services in this module.
|
String |
getName()
Returns the name of the module
|
String[] |
getPublicInterfaces()
Returns the list of classes and packages that have been designated as
public interfaces of this module.
|
String |
getVersion()
Returns the module's version
|
protected void |
parseAttributes(Attributes attr)
Extensibility point to parse more information from Manifest attributes.
|
protected void |
parseClassPath(Attributes attr,
URI baseURI)
Parses from manifest attributes
and updates URI list.
|
String |
toString()
Assists debugging.
|
protected final List<ModuleDependency> dependencies
protected final Attributes mainAttributes
public DefaultModuleDefinition(File location) throws IOException
IOExceptionpublic DefaultModuleDefinition(File location, Attributes attr) throws IOException
IOExceptionprotected void parseClassPath(Attributes attr, URI baseURI) throws IOException
IOExceptionprotected String decorateClassPath(String classpathElement)
parseClassPath(Attributes,URI)protected void parseAttributes(Attributes attr)
attr - Main attributes of the manifest. Always non-null.public String getName()
getName in interface ModuleDefinitionpublic String[] getPublicInterfaces()
getPublicInterfaces in interface ModuleDefinitionpublic ModuleDependency[] getDependencies()
getDependencies in interface ModuleDefinitionpublic URI[] getLocations()
getLocations in interface ModuleDefinitionpublic String getVersion()
getVersion in interface ModuleDefinitionpublic String getImportPolicyClassName()
ImportPolicy interface for this module or
null if there is no such implementationgetImportPolicyClassName in interface ModuleDefinitionImportPolicy implementation class namepublic String getLifecyclePolicyClassName()
LifecyclePolicy interface for this module or
null if there is no such implementationgetLifecyclePolicyClassName in interface ModuleDefinitionLifecyclePolicy implementation class namepublic Manifest getManifest()
getManifest in interface ModuleDefinitionpublic ModuleMetadata getMetadata()
ModuleDefinitiongetMetadata in interface ModuleDefinitionCopyright © 2009-2014 Oracle Corporation. All Rights Reserved.