|
Qwylt | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.module.ModuleSystem
public abstract class ModuleSystem
This class represents a module system provider.
| Constructor Summary | |
|---|---|
protected |
ModuleSystem()
Constructor. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object other)
Test if the specified object is equal to this instance. |
static ModuleSystem |
getModuleSystem(ModuleInfo.Term... required)
Returns the named module system. |
static ModuleSystem |
getModuleSystem(java.util.Set<ModuleInfo.Term> required)
Returns the named module system. |
abstract java.util.Set<ModuleInfo.Term> |
getModuleSystemIDs()
Return the set of identifiers for this module system. |
static java.util.List<ModuleSystem> |
getModuleSystems()
Returns a list of the available module systems. |
abstract java.lang.String |
getQueryFormatDescription()
Returns a description of the query format supported by parseQuery(java.lang.String). |
static ModuleSystem |
getRoot()
Returns the root ModuleSystem. |
int |
hashCode()
Returns the hash code for this instance. |
ModuleRepository |
newRepository(java.lang.String name,
java.io.File rootDirectory)
Returns a new ModuleRepository for this ModuleSystem at the
specified location and with a standard search policy. |
abstract ModuleRepository |
newRepository(java.lang.String name,
java.io.File rootDirectory,
SearchPolicy searchPolicy)
Returns a new ModuleRepository for this ModuleSystem at the
specified location and with the specified search policy. |
abstract ModuleQuery |
parseQuery(java.lang.String query)
Parses the string argument as a ModuleQuery from a format supported
by this ModuleSystem. |
protected ModuleQuery |
parseQuery(java.lang.String query,
char versionSeparator)
A default query parser. |
abstract Version |
parseVersion(java.lang.String version)
Parses the string argument as a version number from a
format supported by this ModuleSystem. |
abstract Matcher<Version> |
parseVersionExpression(java.lang.String versionExpression)
Parses the string argument as a version expression from a format supported by this ModuleSystem. |
abstract ResourceSpace |
resolve(ModuleInfo moduleInfo)
Build a ResourceSpace from the ModuleInfo to provide access
to all imported resources. |
java.lang.String |
toString()
Returns a string representation of this instance. |
void |
verify(ModuleArchive archive)
Check that the specified ModuleInfo is valid. |
abstract void |
verify(ModuleInfo moduleInfo)
Verify the contents of the specified ModuleInfo. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ModuleSystem()
| Method Detail |
|---|
public static ModuleSystem getRoot()
ModuleSystem.
ModuleSystem.public static ModuleSystem getModuleSystem(java.util.Set<ModuleInfo.Term> required)
required - The required module system terms. Each term must
either exactly match one provided by a candidate
module system or the names must match; exact match
is checked first.
null if not found.public static ModuleSystem getModuleSystem(ModuleInfo.Term... required)
required - The required module system terms. Each term must
either exactly match one provided by a candidate
module system or the names must match; exact match
is checked first.
null if not found.public static java.util.List<ModuleSystem> getModuleSystems()
public abstract java.util.Set<ModuleInfo.Term> getModuleSystemIDs()
public abstract void verify(ModuleInfo moduleInfo)
throws java.lang.Exception
ModuleInfo.
moduleInfo - The ModuleInfo to check.
java.lang.Exception - If not valid. // TODO define custom type or message format.
public abstract ResourceSpace resolve(ModuleInfo moduleInfo)
throws ConnectionError
ResourceSpace from the ModuleInfo to provide access
to all imported resources.
moduleInfo - The ModuleInfo to resolve.
ResourceSpace that provides access to all imported resources.
ConnectionError - If resolution fails.public void verify(ModuleArchive archive)
ModuleInfo is valid. At minimum, this will ensure
that all dependencies are satisfied.
archive - The ModuleArchive to check.
ConnectionError - If not valid.public abstract java.lang.String getQueryFormatDescription()
parseQuery(java.lang.String).
public abstract ModuleQuery parseQuery(java.lang.String query)
ModuleQuery from a format supported
by this ModuleSystem.
query - The query in a format supported by this ModuleSystem.
ModuleQuery.
java.lang.IllegalArgumentException - If query format is invalid for
this ModuleSystem.public abstract Version parseVersion(java.lang.String version)
version number from a
format supported by this ModuleSystem.
version - The version in a format supported by this ModuleSystem.
Version instance.
java.lang.IllegalArgumentException - If version format is invalid for
this ModuleSystem.public abstract Matcher<Version> parseVersionExpression(java.lang.String versionExpression)
ModuleSystem.
versionExpression - The version expression string in a format supported by this ModuleSystem.
java.lang.IllegalArgumentException - If versionExpression format is invalid for
this ModuleSystem.
public ModuleRepository newRepository(java.lang.String name,
java.io.File rootDirectory)
throws java.io.IOException
ModuleRepository for this ModuleSystem at the
specified location and with a standard search policy.
name - The repository name.rootDirectory - The repository location.
java.io.IOException - If an I/O error occurs.
public abstract ModuleRepository newRepository(java.lang.String name,
java.io.File rootDirectory,
SearchPolicy searchPolicy)
throws java.io.IOException
ModuleRepository for this ModuleSystem at the
specified location and with the specified search policy.
name - The repository name.rootDirectory - The repository location.searchPolicy - The search policy.
java.io.IOException - If an I/O error occurs.public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - The object to compare to.
true if other is equivalent to this
instance; otherwise, returns false.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
protected ModuleQuery parseQuery(java.lang.String query,
char versionSeparator)
query - The query string.versionSeparator - The character that separates name and version in an identifier.
|
Qwylt | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||