|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.module.ModuleDefinition
public abstract class ModuleDefinition
This class represents the reified module definition in the module system.
ClassLoader
,
Repository
,
Version
Constructor Summary | |
---|---|
protected |
ModuleDefinition()
Constructor used by subclasses. |
Method Summary | |
---|---|
abstract boolean |
allowShadowing()
Returns whether this module was marked to allow shadowing. |
boolean |
equals(Object obj)
Compares the specified object with this ModuleDefinition for
equality. |
String |
getAttribute(String name)
Returns the value corresponding to the specified attribute name that is associated with the module definition in the default locale. |
abstract String |
getAttribute(String name,
Locale locale)
Returns the value corresponding to the specified attribute name that is associated with the module definition in the specific locale. |
abstract Set<String> |
getAttributeNames()
Returns an unmodifiable set of the names of the attributes associated with the module definition. |
abstract Set<String> |
getExportedClasses()
Returns an unmodifiable set of the names of the classes that are exported by this module definition. |
abstract Set<String> |
getExportedResources()
Returns an unmodifiable set of the path of the resources exported by this module definition. |
abstract List<ImportDependency> |
getImportDependencies()
Returns an unmodifiable list of import dependency. |
abstract String |
getImportPolicyClassName()
Returns the name of the import policy class of the module definiton. |
abstract String |
getMainClassName()
Returns the name of the main class of the module definiton. |
abstract Set<String> |
getMemberClasses()
Returns an unmodifiable set of the names of the classes that a member of this module definition. |
abstract ModuleDefinitionContent |
getModuleDefinitionContent()
Returns a ModuleDefinitionContent instance which
represents the content of this module definition. |
Module |
getModuleInstance()
Returns a Module instance for the specified ModuleDefinition
in the ModuleSystem . |
abstract String |
getName()
Returns the name of the module definition. |
abstract Repository |
getRepository()
Returns repository that is associated with the module definition. |
abstract VersionConstraint |
getResourceModuleConstraint()
Returns the version constraint that the resource module must satisfy for it to be used by this module definition. |
abstract VersionConstraint |
getResourceTargetConstraint()
Returns the version constraint that the target module must satisfy for it to use this module definition as resource module. |
abstract Version |
getVersion()
Returns the version of the module definition. |
int |
hashCode()
Returns a hash code for this ModuleDefinition . |
boolean |
isClassExported(String name)
Check if the specified class is exported by this module definition. |
boolean |
isResourceExported(String path)
Check if the specified resource is exported by this module definition. |
String |
toString()
Returns a String object representing this
ModuleDefinition . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ModuleDefinition()
Method Detail |
---|
public abstract String getName()
public abstract Version getVersion()
Version
object.public abstract Set<String> getAttributeNames()
public final String getAttribute(String name)
name
- the name of the attribute.
public abstract String getAttribute(String name, Locale locale)
name
- the name of the attribute.locale
- the locale of the attribute.
public abstract List<ImportDependency> getImportDependencies()
public abstract String getMainClassName()
public abstract String getImportPolicyClassName()
public abstract Repository getRepository()
Repository
object.public abstract Set<String> getMemberClasses()
public abstract Set<String> getExportedClasses()
getMemberClasses()
.
public boolean isClassExported(String name)
name
- the name of the class.
public abstract Set<String> getExportedResources()
Resources are specified as '/' separated paths, with no leading '/'.
public final boolean isResourceExported(String path)
path
- A '/' delimited path (e.g. x/y/Z.class")
public final Module getModuleInstance() throws ModuleInitializationException
Module
instance for the specified ModuleDefinition
in the ModuleSystem
. The module is initialized and ready to use.
Equivalent to:
getRepository().getModuleSystem().getModule(this);
Module
instance of the ModuleDefinition
.
ModuleInitializationException
- if the module instance cannot be initialized.
IllegalStateException
- if the specified module definition
has already been disabled.public abstract VersionConstraint getResourceModuleConstraint()
public abstract VersionConstraint getResourceTargetConstraint()
public abstract boolean allowShadowing()
public abstract ModuleDefinitionContent getModuleDefinitionContent()
ModuleDefinitionContent
instance which
represents the content of this module definition.
If a security manager is present, this method calls the security
manager's checkPermission
method with a
ModuleSystemPermission("accessModuleDefinitionContent")
permission to ensure it's ok to access the content of this module
definition.
ModuleDefinitionContent
instance.
SecurityException
- if a security manager exists and
its checkPermission method denies access
to the content of this module definition.public final boolean equals(Object obj)
ModuleDefinition
for
equality.
Returns true
if and only if obj
is the same object as
this object.
equals
in class Object
obj
- the object to be compared for equality with this module definition.
true
if the specified object is equal to this module definitionpublic final int hashCode()
ModuleDefinition
.
hashCode
in class Object
public String toString()
String
object representing this
ModuleDefinition
.
toString
in class Object
ModuleDefinition
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |