public final class ExternalModule
extends java.lang.Object
An external module is typically provided by a package manager, such as NPM or Pub.
Constructor and Description |
---|
ExternalModule(java.lang.String name,
java.util.Collection<DirectoryPattern> directories)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
io.spine.code.fs.FileReference |
fileInModule(io.spine.code.fs.FileReference fileReference)
Obtains the file reference within this module.
|
int |
hashCode() |
java.lang.String |
name()
Obtains the name of the module.
|
static com.google.common.collect.ImmutableList<ExternalModule> |
predefinedModules()
All the modules in
spineWeb() and spineUsers() . |
boolean |
provides(io.spine.code.fs.FileReference fileReference)
Checks if the module provides the referenced file.
|
static ExternalModule |
spineUsers()
The Spine Users module.
|
static ExternalModule |
spineWeb()
The Spine Web module.
|
public ExternalModule(java.lang.String name, java.util.Collection<DirectoryPattern> directories)
name
- the name of the moduledirectories
- patterns of directories provided by the modulepublic io.spine.code.fs.FileReference fileInModule(io.spine.code.fs.FileReference fileReference)
fileReference
- the relative file referencejava.lang.IllegalStateException
- if the file is not provided by the modulepublic boolean provides(io.spine.code.fs.FileReference fileReference)
fileReference
- the file to checktrue
if the module provides the filepublic java.lang.String name()
public static ExternalModule spineWeb()
public static ExternalModule spineUsers()
public static com.google.common.collect.ImmutableList<ExternalModule> predefinedModules()
spineWeb()
and spineUsers()
.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object