Class DefaultModuleDefinition
java.lang.Object
com.sun.enterprise.module.common_impl.DefaultModuleDefinition
- All Implemented Interfaces:
ModuleDefinition
- Direct Known Subclasses:
CookedModuleDefinition
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List
<ModuleDependency> private static final Manifest
private final String
private final String
private static final Logger
protected final Attributes
Main attributes section of the manifest.private final Manifest
private final ModuleMetadata
Metadata that works like index.private final String
private final String[]
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultModuleDefinition
(File location) TO DO need to support a URI constructorDefaultModuleDefinition
(File location, Attributes attr) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
decorateClassPath
(String classpathElement) Extension point to manipulate the classpath element before it's parsed.Returns the list of module dependenciesReturns the class name implementing theImportPolicy
interface for this module or null if there is no such implementationReturns the class name implementing theLifecyclePolicy
interface for this module or null if there is no such implementationURI[]
Returns the list of URI locations forming the classpath for this module.Returns the manifest file from the module's implementation jar fileGets the metadata that describes various components and services in this module.getName()
Returns the name of the moduleString[]
Returns the list of classes and packages that have been designated as public interfaces of this module.Returns the module's versionprotected void
parseAttributes
(Attributes attr) Extensibility point to parse more information from Manifest attributes.protected void
parseClassPath
(Attributes attr, URI baseURI) Parses "Class-Path" from manifest attributes and updates URI list.private boolean
testClassPath
(URI uri) Optional error diagnostics performed during the development time to check if the URL pointed by the path actually exists.toString()
Assists debugging.
-
Field Details
-
name
-
version
-
publicPkgs
-
dependencies
-
classPath
-
importPolicy
-
lifecyclePolicy
-
manifest
-
mainAttributes
Main attributes section of the manifest. Always non-null. -
metadata
Metadata that works like index. -
EMPTY_MANIFEST
-
LOGGER
-
-
Constructor Details
-
DefaultModuleDefinition
TO DO need to support a URI constructor- Throws:
IOException
-
DefaultModuleDefinition
- Throws:
IOException
-
-
Method Details
-
parseClassPath
Parses "Class-Path" from manifest attributes and updates URI list.- Throws:
IOException
-
testClassPath
Optional error diagnostics performed during the development time to check if the URL pointed by the path actually exists. -
decorateClassPath
Extension point to manipulate the classpath element before it's parsed.- See Also:
-
parseAttributes
Extensibility point to parse more information from Manifest attributes.- Parameters:
attr
- Main attributes of the manifest. Always non-null.
-
getName
Returns the name of the module- Specified by:
getName
in interfaceModuleDefinition
- Returns:
- the name
-
getPublicInterfaces
Returns the list of classes and packages that have been designated as public interfaces of this module.- Specified by:
getPublicInterfaces
in interfaceModuleDefinition
- Returns:
- the list of public packages or classes
-
getDependencies
Returns the list of module dependencies- Specified by:
getDependencies
in interfaceModuleDefinition
- Returns:
- the ModuleDependency
-
getLocations
Returns the list of URI locations forming the classpath for this module.- Specified by:
getLocations
in interfaceModuleDefinition
- Returns:
- the list of URI locations for this module
-
getVersion
Returns the module's version- Specified by:
getVersion
in interfaceModuleDefinition
- Returns:
- the module's version
-
getImportPolicyClassName
Returns the class name implementing theImportPolicy
interface for this module or null if there is no such implementation- Specified by:
getImportPolicyClassName
in interfaceModuleDefinition
- Returns:
- the
ImportPolicy
implementation class name
-
getLifecyclePolicyClassName
Returns the class name implementing theLifecyclePolicy
interface for this module or null if there is no such implementation- Specified by:
getLifecyclePolicyClassName
in interfaceModuleDefinition
- Returns:
- the
LifecyclePolicy
implementation class name
-
getManifest
Returns the manifest file from the module's implementation jar file- Specified by:
getManifest
in interfaceModuleDefinition
- Returns:
- never null.
-
getMetadata
Description copied from interface:ModuleDefinition
Gets the metadata that describes various components and services in this module.- Specified by:
getMetadata
in interfaceModuleDefinition
- Returns:
- Always non-null.
-
toString
Assists debugging.
-