org.pentaho.reporting.libraries.base.boot

Class DefaultModuleInfo

public class DefaultModuleInfo extends Object implements ModuleInfo

Provides a default implementation of the module info interface.

Author: Thomas Morgner

Constructor Summary
DefaultModuleInfo()
DefaultConstructor.
DefaultModuleInfo(String moduleClass, String majorVersion, String minorVersion, String patchLevel)
Creates a new module info an initalizes it with the given values.
Method Summary
booleanequals(Object o)
Two moduleinfos are equal,if they have the same module class.
StringgetMajorVersion()
Returns the major version of the module.
StringgetMinorVersion()
Returns the minor version of the module.
StringgetModuleClass()
Returns the class name of the module described implementation.
StringgetPatchLevel()
Returns the patch level version of the module.
inthashCode()
Computes an hashcode for this module information.
voidsetMajorVersion(String majorVersion)
Defines the major version of the module.
voidsetMinorVersion(String minorVersion)
Defines the minor version of the module.
voidsetModuleClass(String moduleClass)
Defines the module class name.
voidsetPatchLevel(String patchLevel)
Defines the patch level version of the module.
StringtoString()
Returns a string representation of this module information.

Constructor Detail

DefaultModuleInfo

public DefaultModuleInfo()
DefaultConstructor.

DefaultModuleInfo

public DefaultModuleInfo(String moduleClass, String majorVersion, String minorVersion, 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: NullPointerException if the moduleClass is null.

Method Detail

equals

public boolean equals(Object o)
Two moduleinfos are equal,if they have the same module class.

Parameters: o the other object to compare.

Returns: true, if the module points to the same module, false otherwise.

getMajorVersion

public String getMajorVersion()
Returns the major version of the module. This property may be null to indicate that the module version is not specified.

Returns: the major version.

See Also: getMajorVersion

getMinorVersion

public String getMinorVersion()
Returns the minor version of the module. This property may be null to indicate that the module version is not specified.

Returns: the minor version.

See Also: getMajorVersion

getModuleClass

public String getModuleClass()
Returns the class name of the module described implementation.

Returns: the module class name.

See Also: getModuleClass

getPatchLevel

public String getPatchLevel()
Returns the patch level version of the module. This property may be null to indicate that the module version is not specified.

Returns: the patch level version.

See Also: getMajorVersion

hashCode

public int hashCode()
Computes an hashcode for this module information.

Returns: the hashcode.

See Also: Object#hashCode()

setMajorVersion

public void setMajorVersion(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: getMajorVersion

setMinorVersion

public void setMinorVersion(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: getMajorVersion

setModuleClass

public void setModuleClass(String moduleClass)
Defines the module class name.

Parameters: moduleClass the class name of the module implementation.

setPatchLevel

public void setPatchLevel(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: getMajorVersion

toString

public String toString()
Returns a string representation of this module information.

Returns: a string describing this class.

See Also: Object#toString()