public class ModuleMeta extends Object
Modifier and Type | Field and Description |
---|---|
static String |
JAR_RESOURCE_JAR_ENTRY_PREFIX
The resourceJarEntryPrefix for JAR files.
|
protected String |
theActivationClassName
The name of the Module activation/deactivation class.
|
protected String |
theModuleArtifactId
The artifactId of the module.
|
protected long |
theModuleBuildDate
The time when this Module was built.
|
protected String |
theModuleGroupId
The groupId of the module
|
protected JarFile |
theModuleJar
The JAR that this Module provides.
|
protected ModuleLicense |
theModuleLicense
The license of the Module.
|
protected Map<String,String> |
theModuleUserDescriptions
The user-visible descriptions for this Module, keyed by the locale.
|
protected Map<String,String> |
theModuleUserNames
The user-visible names for this Module, keyed by the locale.
|
protected String |
theModuleVersion
The version of the module.
|
protected String |
theResourceJarEntryPrefix
The relative path below which resources, such as a class files,
are to be found.
|
protected String |
theRunClassName
The name of the class in this Module which provides a method to
run this Module.
|
protected ModuleRequirement[] |
theRuntimeModuleRequirements
The requirements for other modules that this Module will have at run time.
|
static String |
UNPACKED_RESOURCE_JAR_ENTRY_PREFIX
The resourceJarEntryPrefix for unpacked directories.
|
static String |
WAR_RESOURCE_JAR_ENTRY_PREFIX
The resourceJarEntryPrefix for WAR files.
|
Modifier | Constructor and Description |
---|---|
protected |
ModuleMeta(String moduleGroupId,
String moduleArtifactId,
String moduleVersion,
Map<String,String> moduleUserNames,
Map<String,String> moduleUserDescriptions,
long moduleBuildDate,
ModuleLicense license,
ModuleRequirement[] runtimeModuleRequirements,
JarFile moduleJar,
String activationClassName,
String runClassName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Module |
createModule(AbstractModuleRegistry registry,
ClassLoader parentClassLoader)
Create a Module from this ModuleMeta.
|
boolean |
equals(Object other)
Two ModuleMetas are the same if they have the same name and version.
|
String |
getActivationClassName()
Obtain the name of the Module activation/deactivation class.
|
String |
getModuleArtifactId()
Obtain the artifactId of the Module.
|
long |
getModuleBuildDate()
Obtain the time at which this Module was built, in System.currentTimeMillis() format.
|
String |
getModuleGroupId()
Obtain the groupId of the Module.
|
ModuleLicense |
getModuleLicense()
Obtain the license for this Module.
|
String |
getModuleUserDescription(Locale loc)
Obtain the internationalized description of the Module in a specified locale.
|
Map<String,String> |
getModuleUserDescriptions()
Obtain the Map of internationalized descriptions of the Module.
|
String |
getModuleUserName()
Obtain the internationalized name of the Module in the current locale.
|
String |
getModuleUserName(Locale loc)
Obtain the internationalized name of the Module in a specified locale.
|
Map<String,String> |
getModuleUserNames()
Obtain the Map of internationalized names of the Module.
|
String |
getModuleVersion()
Obtain the version of this Module.
|
JarFile |
getProvidesJar()
Obtain the JAR file that this Module provides as JarFile.
|
String |
getResourceJarEntryPrefix()
Obtain the relative path below which resources, such as a class files,
are to be found.
|
String |
getRunClassName()
Obtain the name of the class that contains the Module's run method.
|
ModuleRequirement[] |
getRuntimeModuleRequirements()
Obtain the list of requirements for other Modules that this Module depends on
at run time.
|
int |
hashCode()
We determine the hash code by looking at the Module's name and version.
|
String |
toString()
Obtain a String representation.
|
protected String theModuleGroupId
protected String theModuleArtifactId
protected String theModuleVersion
protected long theModuleBuildDate
protected Map<String,String> theModuleUserNames
protected Map<String,String> theModuleUserDescriptions
protected ModuleRequirement[] theRuntimeModuleRequirements
protected ModuleLicense theModuleLicense
protected JarFile theModuleJar
protected String theResourceJarEntryPrefix
public static final String JAR_RESOURCE_JAR_ENTRY_PREFIX
public static final String WAR_RESOURCE_JAR_ENTRY_PREFIX
public static final String UNPACKED_RESOURCE_JAR_ENTRY_PREFIX
protected String theActivationClassName
protected String theRunClassName
protected ModuleMeta(String moduleGroupId, String moduleArtifactId, String moduleVersion, Map<String,String> moduleUserNames, Map<String,String> moduleUserDescriptions, long moduleBuildDate, ModuleLicense license, ModuleRequirement[] runtimeModuleRequirements, JarFile moduleJar, String activationClassName, String runClassName)
moduleGroupId
- the Maven groupId of the to-be-created ModulemoduleArtifactId
- the Maven artifactId of the to-be-created ModulemoduleVersion
- the version of the to-be-created Module, may be null (but that's discouraged)moduleUserNames
- the name shown to the user of the to-be-created Module, keyed by the localemoduleUserDescriptions
- the description shown to the user of the to-be-created Module, keyed by the localemoduleBuildDate
- the time when this Module was builtlicense
- the license for the to-be-created ModuleruntimeModuleRequirements
- the ModuleRequirements of this Module at run timemoduleJar
- JAR file provided by this ModuleactivationClassName
- name of the Module's activation/deactivation class, or nullrunClassName
- name of the class contained in this Module that contains the Module's run method, or nullpublic final String getModuleGroupId()
public final String getModuleArtifactId()
public String getModuleUserName()
public String getModuleUserName(Locale loc)
loc
- the localepublic String getModuleUserDescription(Locale loc)
loc
- the localepublic Map<String,String> getModuleUserNames()
public Map<String,String> getModuleUserDescriptions()
public final String getModuleVersion()
public final long getModuleBuildDate()
public final ModuleLicense getModuleLicense()
public final ModuleRequirement[] getRuntimeModuleRequirements()
public final JarFile getProvidesJar()
public final String getResourceJarEntryPrefix()
public final String getActivationClassName()
public final String getRunClassName()
public boolean equals(Object other)
public int hashCode()
protected Module createModule(AbstractModuleRegistry registry, ClassLoader parentClassLoader)
registry
- the AbstractModuleRegistry in which the to-be-created Module will look for dependent ModulesparentClassLoader
- the ClassLoader of our parent ModuleCopyright © 2018. All rights reserved.