Package org.eclipse.jetty.start
Class Module
java.lang.Object
org.eclipse.jetty.start.Module
- All Implemented Interfaces:
Comparable<Module>
Represents a Module metadata, as defined in Jetty.
A module consists of:
- A set of jar files, directories and/or jar file patterns to be added to the classpath
- A list of XML configuration files
- Properties set either directly or via a file of properties
- A set of modules names (or capability names) that this module depends on.
- A set of capability names that this module provides (including it's own name).
- Licence details for using the module
${jetty.home}/modules
and
${jetty.home}/modules
directories. A module may refer to
non-discovered dynamic module in a subdirectory, using a property as part or
all of the name.
A module may be enabled, either directly by name or transiently via a dependency
from another module by name or provided capability.-
Field Summary
FieldsModifier and TypeFieldDescriptionList of default configDependencies from[depends]
sectionThe module descriptionprivate final boolean
Is the module dynamic - ie referenced rather than discoveredList of selections for this ModuleList of files for this ModuleList of ini template linesList of JPMS options for this ModuleList of jvm ArgsList of library options for this ModuleLicense linesprivate final String
The name of the moduleprivate boolean
Boolean true if directly enabled, false if all selections are transitiveOptional dependencies from[optional]
section are structural in nature.private final Path
The file of the moduleList of provides for this Moduleprivate boolean
Skip File Validation (default: false)List of tags for this ModuleList of xml configurations for this Module(package private) static Pattern
(package private) static Pattern
private Version
The version of Jetty the module supportsprivate static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
boolean
boolean
void
expandDependencies
(Props props) getFiles()
getJPMS()
getLibs()
getName()
getTags()
getXmls()
boolean
boolean
int
hashCode()
boolean
boolean
static boolean
isConditionalDependency
(String depends) boolean
Indicates a module that is dynamic in natureboolean
boolean
boolean
static String
normalizeModuleName
(String name) void
void
setSkipFilesValidation
(boolean skipFilesValidation) toString()
void
writeIniSection
(BufferedWriter writer, Props props)
-
Field Details
-
VERSION_UNSPECIFIED
- See Also:
-
MOD_NAME
-
SET_PROPERTY
-
_path
The file of the module -
_name
The name of the module -
_dynamic
private final boolean _dynamicIs the module dynamic - ie referenced rather than discovered -
version
The version of Jetty the module supports -
_description
The module description -
_xmls
List of xml configurations for this Module -
_iniTemplate
List of ini template lines -
_defaultConfig
List of default config -
_libs
List of library options for this Module -
_jpms
List of JPMS options for this Module -
_files
List of files for this Module -
_enables
List of selections for this Module -
_provides
List of provides for this Module -
_tags
List of tags for this Module -
_notTransitive
private boolean _notTransitiveBoolean true if directly enabled, false if all selections are transitive -
_skipFilesValidation
private boolean _skipFilesValidationSkip File Validation (default: false) -
_jvmArgs
List of jvm Args -
_license
License lines -
_depends
Dependencies from[depends]
section -
_optional
Optional dependencies from[optional]
section are structural in nature.
-
-
Constructor Details
-
Module
- Throws:
IOException
-
-
Method Details
-
isConditionalDependency
-
normalizeModuleName
-
getName
-
equals
-
expandDependencies
-
getDefaultConfig
-
getIniTemplate
-
getFiles
-
isSkipFilesValidation
public boolean isSkipFilesValidation() -
getJvmArgs
-
getLibs
-
getLicense
-
getXmls
-
getJPMS
-
getVersion
-
hasDefaultConfig
public boolean hasDefaultConfig() -
hasIniTemplate
public boolean hasIniTemplate() -
hashCode
public int hashCode() -
hasLicense
public boolean hasLicense() -
isDynamic
public boolean isDynamic()Indicates a module that is dynamic in nature- Returns:
- a module where the name is not in the top level of the modules directory
-
hasFiles
-
process
- Throws:
IOException
-
clearTransitiveEnable
public boolean clearTransitiveEnable() -
setSkipFilesValidation
public void setSkipFilesValidation(boolean skipFilesValidation) -
toString
-
getDepends
-
getProvides
-
getOptional
-
getDescription
-
getTags
-
getPrimaryTag
-
isEnabled
public boolean isEnabled() -
getEnableSources
-
enable
- Parameters:
source
- String describing where the module was enabled fromtransitive
- True if the enable is transitive- Returns:
- true if the module was not previously enabled
-
isTransitive
public boolean isTransitive() -
writeIniSection
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Module>
-