|
Qwylt | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.module.AttributeSource
java.lang.module.ModuleArchive
public abstract class ModuleArchive
This class represents the data, both metadata and resources, of a
module stored in a ModuleRepository.
| Field Summary |
|---|
| Fields inherited from class java.lang.module.AttributeSource |
|---|
NO_ATTRIBUTES, SERVICE_IMPLEMENTATION_KEY |
| Constructor Summary | |
|---|---|
ModuleArchive()
|
|
| Method Summary | ||
|---|---|---|
protected abstract void |
close()
Close this archive. |
|
protected Module |
createNewModule()
Create a new Module instance. |
|
boolean |
equals(java.lang.Object other)
Test if the specified object is equal to this instance, enforcing identity comparison. |
|
|
getAnnotation(java.lang.Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null. |
|
java.lang.annotation.Annotation[] |
getAnnotations()
Returns all annotations present on this element. |
|
protected java.lang.reflect.AnnotatedElement |
getAnnotationSource()
Returns the AnnotatedElement instance to which the public
AnnotatedElement methods will delegate. |
|
java.lang.annotation.Annotation[] |
getDeclaredAnnotations()
Returns all annotations that are directly present on this element. |
|
ConnectionError |
getError()
Returns the error if this Module failed during initialization. |
|
abstract Export |
getExport(ExportMatcher matcher)
Returns the first Export matching the specified matcher. |
|
abstract Export |
getExport(ScopedName.Scope scope,
java.lang.String name)
Returns the first Export matching the specified scope and name. |
|
abstract java.util.List<? extends Export> |
getExports()
Returns the direct exports of this ModuleArchive. |
|
abstract java.util.List<? extends Export> |
getExports(ExportMatcher matcher)
Returns all Exports matching the specified matcher. |
|
abstract ModuleIdentity |
getIdentity()
Returns the identity of this ModuleArchive. |
|
java.util.Set<ModuleArchive> |
getImported()
Returns the imported ModuleArchives. |
|
abstract java.util.List<? extends Import> |
getImports()
Returns the module imports of this ModuleArchive. |
|
abstract java.lang.String |
getMainClassName()
Returns the name of the main class. |
|
Module |
getModule()
Get the cached Module instance for this ModuleArchive,
creating and initializing it if required. |
|
ModuleSystem |
getModuleSystem()
Returns the ModuleSystem of this ModuleArchive. |
|
java.lang.String |
getName()
Returns the name of this ModuleArchive. |
|
abstract ModuleRepository |
getRepository()
Returns the ModuleRepository that contains this ModuleArchive. |
|
abstract java.util.List<? extends ModuleResources> |
getResources()
Returns the list of resources of this ModuleArchive. |
|
static ModuleArchive |
getRootArchive()
Returns the root ModuleArchive, which is the sole
exporter of packages with the "java." prefix. |
|
abstract ModuleState |
getState()
TODO: change to 'module' access! Returns the state for this instance. |
|
abstract long |
getStorageSize()
Returns the number of bytes required to store this archive. |
|
Version |
getVersion()
Returns the version of this ModuleArchive. |
|
boolean |
hasExport(ExportMatcher matcher)
Returns true if this ModuleArchive has a matching Export. |
|
int |
hashCode()
Returns the identity hash code
for this instance. |
|
boolean |
hasModule()
Returns whether or not this ModuleArchive has a
fully initialized Module instance. |
|
boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns true if an annotation for the specified type is present on this element, else false. |
|
Module |
newModule()
Creates and returns a new Module instance from
this archive. |
|
abstract boolean |
permitsImport(Import requestor)
Returns true if this ModuleArchive may be
imported by the specified import. |
|
abstract boolean |
permitsLocal(ModuleArchive requestor)
Returns true if this ModuleArchive may be
made local to the specified archive. |
|
void |
releaseModule(boolean disconnect)
Release the cached Module so that the next call to getModule()
will create a new instance. |
|
java.lang.String |
toString()
Returns a string representation of this instance. |
|
| Methods inherited from class java.lang.module.AttributeSource |
|---|
appendAttributes, asList, containsAttribute, containsAttributes, getAttribute, getAttributeAsList, getAttributeKeys, getAttributes, modifiableList, unmodifiableMap, unmodifiableMap |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ModuleArchive()
| Method Detail |
|---|
public static ModuleArchive getRootArchive()
ModuleArchive, which is the sole
exporter of packages with the "java." prefix.
ModuleArchive.public java.lang.String getName()
ModuleArchive.
getName in class AttributeSourcepublic Version getVersion()
ModuleArchive.
Version.public abstract ModuleIdentity getIdentity()
ModuleArchive.
ModuleIdentity.public ModuleSystem getModuleSystem()
ModuleSystem of this ModuleArchive.
ModuleSystem.public abstract java.util.List<? extends Import> getImports()
module imports of this ModuleArchive.
Imports.
public abstract Export getExport(ScopedName.Scope scope,
java.lang.String name)
Export matching the specified scope and name.
scope - The scope for the name.name -
Export or null if not found.public abstract Export getExport(ExportMatcher matcher)
Export matching the specified matcher.
matcher - The matcher.
Export or null if not found.public boolean hasExport(ExportMatcher matcher)
true if this ModuleArchive has a matching Export.
matcher - The matcher.
true if a matching Export is found, false otherwise.public abstract java.util.List<? extends Export> getExports(ExportMatcher matcher)
Exports matching the specified matcher.
matcher - The matcher.
Exports, empty if none.public abstract java.util.List<? extends Export> getExports()
ModuleArchive.
Exports, including
an entry for this archive itself (Scope == MODULE).public abstract ModuleRepository getRepository()
ModuleRepository that contains this ModuleArchive.
public abstract java.util.List<? extends ModuleResources> getResources()
ModuleArchive.
public abstract java.lang.String getMainClassName()
null if none.public abstract long getStorageSize()
public boolean hasModule()
ModuleArchive has a
fully initialized Module instance.
true if this ModuleArchive has a fully
initialized Module instance; otherwise,
returns false.public final Module getModule()
Module instance for this ModuleArchive,
creating and initializing it if required. The calling thread will
block until initialization is completed.
Module instance.
ConnectionError - if the the instance does not already exist
and initialization fails.public final void releaseModule(boolean disconnect)
Module so that the next call to getModule()
will create a new instance.
disconnect - true iff the state should also be disconnected so
that subsequent instances will be re-connected.public final Module newModule()
Module instance from
this archive. The result is not cached and is therefore
guaranteed never to be the same as that returned by
getModule().
Module instance.
ConnectionError - if initialization fails.public ConnectionError getError()
Module failed during initialization.
null.public java.util.Set<ModuleArchive> getImported()
ModuleArchives.
ConnectionError - if initialization fails.public abstract boolean permitsImport(Import requestor)
true if this ModuleArchive may be
imported by the specified import.
requestor - The requesting import.
true if this archive can be imported by
the requestor, false if not.public abstract boolean permitsLocal(ModuleArchive requestor)
true if this ModuleArchive may be
made local to the specified archive.
requestor - The requesting archive.
true if this archive can be made local to
the requestor, false if not.public abstract ModuleState getState()
state for this instance.
public final boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - The object to compare to.
true if other is the same as this
instance; otherwise, returns false.public final int hashCode()
identity hash code
for this instance.
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
isAnnotationPresent in interface java.lang.reflect.AnnotatedElementannotationClass - the Class object corresponding to the
annotation type
java.lang.NullPointerException - if the given annotation class is nullpublic <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
getAnnotation in interface java.lang.reflect.AnnotatedElementannotationClass - the Class object corresponding to the
annotation type
java.lang.NullPointerException - if the given annotation class is nullpublic java.lang.annotation.Annotation[] getAnnotations()
getAnnotations in interface java.lang.reflect.AnnotatedElementpublic java.lang.annotation.Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations in interface java.lang.reflect.AnnotatedElementprotected java.lang.reflect.AnnotatedElement getAnnotationSource()
AnnotatedElement instance to which the public
AnnotatedElement methods will delegate. The default
implementation of this method returns an instance with no
annotations.
AnnotatedElement instance.protected Module createNewModule()
Module instance.
protected abstract void close()
|
Qwylt | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||