Interface Module

  • All Superinterfaces:
    Comparable<Module>

    public interface Module
    extends Comparable<Module>
    Represents a module.

    This interface is not intended to be implemented by clients.

    • Method Detail

      • getModuleId

        long getModuleId()
        Returns:
        The module's unique identifier.
      • getManifestVersion

        String getManifestVersion()
        Returns:
        The version of the module's manifest.
      • getSymbolicName

        String getSymbolicName()
        Returns:
        The module's symbolic name.
      • getVersion

        Version getVersion()
        Returns:
        The module's version.
      • getState

        ModuleState getState()
        Returns:
        The current state of this module.
      • getName

        String getName()
        Returns:
        The module's name, or null if not set.
      • getVendor

        String getVendor()
        Returns:
        The name of the vendor of this module, or null if not set.
      • getChangelog

        String getChangelog()
        Returns:
        The changelog information of this module, or null if not set.
      • getCopyright

        String getCopyright()
        Returns:
        The copyright notice of this module, or null if not set.
      • getContactAddress

        String getContactAddress()
        Returns:
        The contact address of the vendor of this mdule, or null if not set.
      • getFunding

        String getFunding()
        Returns:
        The agency providing the funding for development, or null if not set.
      • getDescription

        String getDescription()
        Returns:
        The module's description, or null if not set.
      • getUrl

        String getUrl()
        Returns:
        The URL of the home page or documentation of this module, or null if not set.
      • getAboutUrl

        String getAboutUrl()
        Returns:
        The location of the module's 'about.html' file.
      • getLicenseUrl

        String getLicenseUrl()
        Returns:
        The location of the module's license.
      • getContentLength

        long getContentLength()
        Returns:
        The content length in bytes of the module's archive file (if any).
      • getLastModified

        long getLastModified()
        Returns:
        The date of the last modification expressed in milliseconds since 01.01.1970.
      • getCategories

        String[] getCategories()
        Returns:
        The module's categories.
      • getPackaging

        String getPackaging()
        Returns:
        The module's packaging, e.g. "dir", "jar", "zip".
      • isNative

        boolean isNative()
        Returns:
        true if the module uses native libraries via JNI.
      • getActivatorClassName

        String getActivatorClassName()
        Returns:
        The name of this module's activator class.
      • getLocation

        URL getLocation()
        Returns:
        The module's (file) location.
      • getDeclaredDependencies

        Dependency[] getDeclaredDependencies()
        Returns:
        The module's declared dependencies.
      • getExtensionPoints

        ExtensionPoint[] getExtensionPoints()
        Returns:
        The module's declared extension points.
      • getExtensionPoint

        ExtensionPoint getExtensionPoint​(String extensionPointId)
        Gets the extension point for the given extension point identifier.
        Parameters:
        extensionPointId - The extension point identifier. Can by fully qualified (<moduleId>:<extensionPointId>) or simple.
        Returns:
        The extension point.
      • getExtension

        Extension getExtension​(String extensionId)
        Gets the extension with the specified identifier.
        Parameters:
        extensionId - The extension identifier.
        Returns:
        The extension or null if no such was found.
      • getExtensions

        Extension[] getExtensions()
        Returns:
        The module's declared extensions.
      • getClassLoader

        ClassLoader getClassLoader()
        Gets the class loader used by this module.
        Returns:
        The class loader, or null if this module has not yet been resolved.
      • getResource

        URL getResource​(String name)
        Finds the resource with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.

        The name of a resource is a '/'-separated path name that identifies the resource.

        Parameters:
        name - The resource name
        Returns:
        A URL object for reading the resource, or null if the resource could not be found or the invoker doesn't have adequate privileges to get the resource.
        See Also:
        ClassLoader.getResource(String)
      • getResourceAsStream

        InputStream getResourceAsStream​(String name)
        Returns an input stream for reading the specified resource.

        The name of a resource is a /-separated path name that identifies the resource.

        Parameters:
        name - The resource name
        Returns:
        An input stream for reading the resource, or null if the resource could not be found
        See Also:
        ClassLoader.getResourceAsStream(String)
      • getResources

        Enumeration<URL> getResources​(String name)
                               throws IOException
        Finds all the resources with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.

        The name of a resource is a /-separated path name that identifies the resource.

        Parameters:
        name - The resource name
        Returns:
        An enumeration of URL objects for the resource. If no resources could be found, the enumeration will be empty. Resources that the module doesn't have access to will not be in the enumeration.
        Throws:
        IOException - If I/O errors occur
        See Also:
        ClassLoader.getResources(String)