public final class ModuleDescriptor
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ModuleDescriptor.Builder
Builds instances of
ModuleDescriptor. |
| Modifier and Type | Method and Description |
|---|---|
void |
applySlot(java.lang.String slot)
Sets the slot to the given value, if the slot is not set.
|
static ModuleDescriptor |
copy(java.lang.String name,
ModuleDescriptor originalModule)
Creates a shallow copy of the module descriptor.
|
static ModuleDescriptor |
create(java.lang.String name)
Creates a module with a given name.
|
boolean |
equals(java.lang.Object object) |
ApplyToDependencies |
getApplyToDependencies()
Returns the information that has to be applied to dependencies if the
matcher matches the name of a module.
|
ApplyToModule |
getApplyToModule()
Returns the module information to be applied to the generated module.
|
Directives |
getDirectives()
Returns the directives for this module.
|
ArtifactMatcher |
getMatcher()
Returns the artifact matcher to define the rules for matching artifacts to
be included as resources to a module.
|
java.lang.String |
getName()
Returns the name of the module.
|
java.lang.String |
getSlot()
Returns the name of the slot this module is part of.
|
int |
hashCode() |
MatchContext |
match(Artifact artifact)
Checks if the given artifact matches the module descriptor.
|
void |
merge(ModuleDescriptor moduleDescriptor)
Merges the dependencies, properties, port and export of the given module
descriptor with this one.
|
java.lang.String |
toString() |
public static ModuleDescriptor copy(java.lang.String name, ModuleDescriptor originalModule)
name - the name of the module.originalModule - the descriptor to shallow copy.public static ModuleDescriptor create(java.lang.String name)
name - the name of the module.public java.lang.String getName()
public java.lang.String getSlot()
null.public Directives getDirectives()
public ArtifactMatcher getMatcher()
public ApplyToDependencies getApplyToDependencies()
public ApplyToModule getApplyToModule()
public void applySlot(java.lang.String slot)
slot - the slot to set.public MatchContext match(Artifact artifact)
artifact - the artifact to match.true if the module descriptor matches the given
artifact, false otherwise.public void merge(ModuleDescriptor moduleDescriptor) throws java.lang.NullPointerException, java.lang.IllegalArgumentException
moduleDescriptor - the module descriptor to merge with this instance.java.lang.NullPointerException - if moduleDescriptor is
null.java.lang.IllegalArgumentException - if the module descriptor is illegal to be
merged.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic java.lang.String toString()
Provides the properties via reflection for displaying debug information.
toString in class java.lang.Object