Class ModuleDependency

java.lang.Object
com.sun.enterprise.module.ModuleDependency

public class ModuleDependency extends Object
A ModuleDependency instance holds all information necessary to identify a dependency between modules. Modules can declare their dependency on a separate module using the name, the version and whether they accept the sub module implementation to be shared. They can also specify whether or not they want to re-export the sub module public interfaces. Re-exporting means that the sub-module's public interfaces will also be published as a public interface of the enclosing module.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
     
    private final boolean
     
    private final boolean
     
    private final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ModuleDependency(String name, String version)
    Create a new instance of ModuleDependency, where the sub module is idenfied by its name and version.
    ModuleDependency(String name, String version, boolean shared, boolean reexport)
    Create a new instance of ModuleDependency, where the sub module is idenfied by its name and version and wheter the containing module requires a private copy or not
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the module name
    Returns the module version
    boolean
    Returns true if the containing module is reexporting the public interfaces of the sub module
    boolean
    Returns true if the containing module accept a shared implementation of the sub module
    Returns a string representation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • name

      private final String name
    • version

      private final String version
    • shared

      private final boolean shared
    • reexport

      private final boolean reexport
  • Constructor Details

    • ModuleDependency

      public ModuleDependency(String name, String version)
      Create a new instance of ModuleDependency, where the sub module is idenfied by its name and version. The sub module implementation should be shared among users of that module
      Parameters:
      name - the module name
      version - the module version
    • ModuleDependency

      public ModuleDependency(String name, String version, boolean shared, boolean reexport)
      Create a new instance of ModuleDependency, where the sub module is idenfied by its name and version and wheter the containing module requires a private copy or not
      Parameters:
      name - the module name
      version - the module version
      shared - true if the containing module accept a shared copy
  • Method Details

    • getName

      public String getName()
      Returns the module name
      Returns:
      the module name
    • getVersion

      public String getVersion()
      Returns the module version
      Returns:
      the module version
    • isShared

      public boolean isShared()
      Returns true if the containing module accept a shared implementation of the sub module
      Returns:
      true if shared implementation is acceptable
    • isReexporting

      public boolean isReexporting()
      Returns true if the containing module is reexporting the public interfaces of the sub module
      Returns:
      true if reexporting the sub module public interface
    • toString

      public String toString()
      Returns a string representation
      Overrides:
      toString in class Object
      Returns:
      a printable string about myself