Class DefaultModuleInfo

  • All Implemented Interfaces:
    ModuleInfo
    Direct Known Subclasses:
    AbstractModule

    public class DefaultModuleInfo
    extends java.lang.Object
    implements ModuleInfo
    Provides a default implementation of the module info interface.
    Author:
    Thomas Morgner
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultModuleInfo()
      DefaultConstructor.
      DefaultModuleInfo​(java.lang.String moduleClass, java.lang.String majorVersion, java.lang.String minorVersion, java.lang.String patchLevel)
      Creates a new module info an initalizes it with the given values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Two moduleinfos are equal,if they have the same module class.
      java.lang.String getMajorVersion()
      Returns the major version of the module.
      java.lang.String getMinorVersion()
      Returns the minor version of the module.
      java.lang.String getModuleClass()
      Returns the class name of the module described implementation.
      java.lang.String getPatchLevel()
      Returns the patch level version of the module.
      int hashCode()
      Computes an hashcode for this module information.
      void setMajorVersion​(java.lang.String majorVersion)
      Defines the major version of the module.
      void setMinorVersion​(java.lang.String minorVersion)
      Defines the minor version of the module.
      void setModuleClass​(java.lang.String moduleClass)
      Defines the module class name.
      void setPatchLevel​(java.lang.String patchLevel)
      Defines the patch level version of the module.
      java.lang.String toString()
      Returns a string representation of this module information.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultModuleInfo

        public DefaultModuleInfo()
        DefaultConstructor.
      • DefaultModuleInfo

        public DefaultModuleInfo​(java.lang.String moduleClass,
                                 java.lang.String majorVersion,
                                 java.lang.String minorVersion,
                                 java.lang.String patchLevel)
        Creates a new module info an initalizes it with the given values.
        Parameters:
        moduleClass - the class name of the module implementation holding the module description.
        majorVersion - the modules major version.
        minorVersion - the modules minor version.
        patchLevel - the modules patchlevel.
        Throws:
        java.lang.NullPointerException - if the moduleClass is null.
    • Method Detail

      • setModuleClass

        public void setModuleClass​(java.lang.String moduleClass)
        Defines the module class name.
        Parameters:
        moduleClass - the class name of the module implementation.
      • getMajorVersion

        public java.lang.String getMajorVersion()
        Returns the major version of the module. This property may be null to indicate that the module version is not specified.
        Specified by:
        getMajorVersion in interface ModuleInfo
        Returns:
        the major version.
        See Also:
        ModuleInfo.getMajorVersion()
      • setMajorVersion

        public void setMajorVersion​(java.lang.String majorVersion)
        Defines the major version of the module. This property may be null to indicate that the module version is not specified.
        Parameters:
        majorVersion - the major version.
        See Also:
        ModuleInfo.getMajorVersion()
      • getMinorVersion

        public java.lang.String getMinorVersion()
        Returns the minor version of the module. This property may be null to indicate that the module version is not specified.
        Specified by:
        getMinorVersion in interface ModuleInfo
        Returns:
        the minor version.
        See Also:
        ModuleInfo.getMajorVersion()
      • setMinorVersion

        public void setMinorVersion​(java.lang.String minorVersion)
        Defines the minor version of the module. This property may be null to indicate that the module version is not specified.
        Parameters:
        minorVersion - the minor version.
        See Also:
        ModuleInfo.getMajorVersion()
      • getPatchLevel

        public java.lang.String getPatchLevel()
        Returns the patch level version of the module. This property may be null to indicate that the module version is not specified.
        Specified by:
        getPatchLevel in interface ModuleInfo
        Returns:
        the patch level version.
        See Also:
        ModuleInfo.getMajorVersion()
      • setPatchLevel

        public void setPatchLevel​(java.lang.String patchLevel)
        Defines the patch level version of the module. This property may be null to indicate that the module version is not specified.
        Parameters:
        patchLevel - the patch level version.
        See Also:
        ModuleInfo.getMajorVersion()
      • equals

        public boolean equals​(java.lang.Object o)
        Two moduleinfos are equal,if they have the same module class.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - the other object to compare.
        Returns:
        true, if the module points to the same module, false otherwise.
      • hashCode

        public int hashCode()
        Computes an hashcode for this module information.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hashcode.
        See Also:
        Object.hashCode()
      • toString

        public java.lang.String toString()
        Returns a string representation of this module information.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string describing this class.
        See Also:
        Object.toString()