Module org.glassfish.hk2.core
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.- Author:
- Jerome Dochez
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<ModuleDependency>protected final AttributesMain attributes section of the manifest. -
Constructor Summary
ConstructorsConstructorDescriptionDefaultModuleDefinition(File location) TO DO need to support a URI constructorDefaultModuleDefinition(File location, Attributes attr) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdecorateClassPath(String classpathElement) Extension point to manipulate the classpath element before it's parsed.Returns the list of module dependenciesReturns the class name implementing theImportPolicyinterface for this module or null if there is no such implementationReturns the class name implementing theLifecyclePolicyinterface 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 voidparseAttributes(Attributes attr) Extensibility point to parse more information from Manifest attributes.protected voidparseClassPath(Attributes attr, URI baseURI) Parses "Class-Path" from manifest attributes and updates URI list.toString()Assists debugging.
-
Field Details
-
dependencies
-
classPath
-
mainAttributes
Main attributes section of the manifest. Always non-null.
-
-
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
-
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:
getNamein interfaceModuleDefinition- Returns:
- the name
-
getPublicInterfaces
Returns the list of classes and packages that have been designated as public interfaces of this module.- Specified by:
getPublicInterfacesin interfaceModuleDefinition- Returns:
- the list of public packages or classes
-
getDependencies
Returns the list of module dependencies- Specified by:
getDependenciesin interfaceModuleDefinition- Returns:
- the ModuleDependency
-
getLocations
Returns the list of URI locations forming the classpath for this module.- Specified by:
getLocationsin interfaceModuleDefinition- Returns:
- the list of URI locations for this module
-
getVersion
Returns the module's version- Specified by:
getVersionin interfaceModuleDefinition- Returns:
- the module's version
-
getImportPolicyClassName
Returns the class name implementing theImportPolicyinterface for this module or null if there is no such implementation- Specified by:
getImportPolicyClassNamein interfaceModuleDefinition- Returns:
- the
ImportPolicyimplementation class name
-
getLifecyclePolicyClassName
Returns the class name implementing theLifecyclePolicyinterface for this module or null if there is no such implementation- Specified by:
getLifecyclePolicyClassNamein interfaceModuleDefinition- Returns:
- the
LifecyclePolicyimplementation class name
-
getManifest
Returns the manifest file from the module's implementation jar file- Specified by:
getManifestin interfaceModuleDefinition- Returns:
- never null.
-
getMetadata
Description copied from interface:ModuleDefinitionGets the metadata that describes various components and services in this module.- Specified by:
getMetadatain interfaceModuleDefinition- Returns:
- Always non-null.
-
toString
Assists debugging.
-