org.jfree.report.modules
public class: DefaultModuleInfo [javadoc |
source]
java.lang.Object
org.jfree.report.modules.DefaultModuleInfo
All Implemented Interfaces:
ModuleInfo
Direct Known Subclasses:
PreviewBaseModule, ConverterGUIModule, HTMLTableModule, HTMLExportGUIModule, PDFExportGUIModule, PageLayoutModule, XLSTableModule, PDFPageableModule, DefaultLogModule, TranslationModule, AbstractModule
Provides a default implementation of the module info interface.
| Constructor: |
public DefaultModuleInfo() {
}
|
public DefaultModuleInfo(String moduleClass,
String majorVersion,
String minorVersion,
String patchLevel) {
if (moduleClass == null)
{
throw new NullPointerException("Module class must not be null.");
}
this.moduleClass = moduleClass;
this.majorVersion = majorVersion;
this.minorVersion = minorVersion;
this.patchLevel = 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 from org.jfree.report.modules.DefaultModuleInfo Summary: |
|---|
|
equals, getMajorVersion, getMinorVersion, getModuleClass, getPatchLevel, hashCode, setMajorVersion, setMinorVersion, setModuleClass, setPatchLevel, toString |
| Method from org.jfree.report.modules.DefaultModuleInfo Detail: |
public boolean equals(Object o) {
if (this == o)
{
return true;
}
if (!(o instanceof DefaultModuleInfo))
{
return false;
}
final ModuleInfo defaultModuleInfo = (ModuleInfo) o;
if (!moduleClass.equals(defaultModuleInfo.getModuleClass()))
{
return false;
}
return true;
}
Two moduleinfos are equal,if they have the same module class. |
public String getMajorVersion() {
return majorVersion;
}
Returns the major version of the module. This property may be
null to indicate that the module version is not specified. |
public String getMinorVersion() {
return minorVersion;
}
Returns the minor version of the module. This property may be
null to indicate that the module version is not specified. |
public String getModuleClass() {
return moduleClass;
}
Returns the class name of the module described implementation. |
public String getPatchLevel() {
return patchLevel;
}
Returns the patch level version of the module. This property may be
null to indicate that the module version is not specified. |
public int hashCode() {
final int result;
result = moduleClass.hashCode();
return result;
}
Computes an hashcode for this module information. |
public void setMajorVersion(String majorVersion) {
this.majorVersion = majorVersion;
}
Defines the major version of the module. This property may be
null to indicate that the module version is not specified. |
public void setMinorVersion(String minorVersion) {
this.minorVersion = minorVersion;
}
Defines the minor version of the module. This property may be
null to indicate that the module version is not specified. |
public void setModuleClass(String moduleClass) {
if (moduleClass == null)
{
throw new NullPointerException();
}
this.moduleClass = moduleClass;
}
Defines the module class name. |
public void setPatchLevel(String patchLevel) {
this.patchLevel = patchLevel;
}
Defines the patch level version of the module. This property may be
null to indicate that the module version is not specified. |
public String toString() {
final StringBuffer buffer = new StringBuffer();
buffer.append(getClass().getName());
buffer.append("={ModuleClass=");
buffer.append(getModuleClass());
if (getMajorVersion() != null)
{
buffer.append("; Version=");
buffer.append(getMajorVersion());
if (getMinorVersion() != null)
{
buffer.append("-");
buffer.append(getMinorVersion());
if (getPatchLevel() != null)
{
buffer.append("_");
buffer.append(getPatchLevel());
}
}
}
buffer.append("}");
return buffer.toString();
}
Returns a string representation of this module information. |