|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTranslatableAnalyzer
com.ibm.dtfj.analyzer.base.SimpleAnalyzerBean
public abstract class SimpleAnalyzerBean
Common base class for all simple Analyzer bean classes in the DEAL library
Constructor Summary | |
---|---|
SimpleAnalyzerBean()
|
Method Summary | |
---|---|
protected IAnalysisReport |
allocateReport(java.lang.Object refKey)
Create and initialize the default type of AnalysisReport object used by Analyzers using this infrastructure. |
protected static IReportOptions |
allocateReportOptions()
Create and initialize the default type of ReportOptions object used by Analyzers using this infrastructure. |
protected IAnalysisReport |
allocateSecondaryReport(java.lang.String sectionName,
java.lang.Object refKey)
Create and initialize an AnalysisReport object suitable for holding a secondary report, to be included as a sub-section of the main report from an Analyzer. |
int |
getCachingPriority()
Return an indication of how desirable it is for the AnalyzerContext to cache instances of this analyzer, so that multiple calls to loadAnalyzer() will return the cached instance instead of allocating and initializing a new one each time. |
java.lang.String[] |
getCategories()
|
IAnalyzerContext |
getContext()
|
java.lang.String |
getIdentityString()
Provide a way for an analyzer to specify a customized identity string, that will be used in report references created with IAnalysisReport.printIdent(). |
protected static SimpleAnalyzerBean |
getInstance(IAnalyzerContext context,
java.lang.String analyzerName,
java.lang.Object parent)
Utility method to gain access to an instance of a specific analyzer object |
protected java.util.logging.Logger |
getLogger()
Return the shared logger object to report errors and for tracing. |
java.lang.String |
getLongDescription()
Produce a long description of the function of this analyser. |
java.lang.String |
getName()
|
protected java.lang.Object |
getNextValidObject(java.util.Iterator it,
java.lang.String desc,
IAnalysisReport out)
Return the next valid object from an iterator that may contain some CorrupData fillers. |
java.lang.Object |
getParent()
Return the parent object of which this analyzer bean represents some aspect (either a core DTFJ object or another analyzer bean). |
protected static ReportExtensionHelper |
getReportExtensionHelper()
|
java.lang.String |
getResourceBundleName()
(non-Javadoc) SimpleAnalyzerBean uses SimpleAnalyzerBean.properties because it is not derived from MessageLogger and to keep them separate from MessageLogger.properties which might still be available from the context |
java.lang.String |
getShortDescription()
Return a short description of the analyzer purpose. |
java.lang.String |
getVersion()
Get version information for this analyser. |
boolean |
isPrimaryAnalyzer()
Some Analyzers are designed to perform analysis tasks and others are designed to perform supporting tasks such as wrapping a DTFJ object and providing extra information. |
protected void |
printEmbeddedReport(IAnalysisReport out,
java.lang.String title,
IReport target,
java.lang.String tag)
Utility method to invoke a report from another analyzer and include it in the current analyzer's report. |
protected void |
printEmbeddedReport(IAnalysisReport out,
java.lang.String title,
java.lang.String analyzerName,
java.lang.Object parent,
java.lang.String tag)
Utility method to invoke a report from another analyzer and include it in the current analyzer's report. |
protected void |
printEmbeddedReportWithOptions(IAnalysisReport out,
java.lang.String title,
IReport target,
IReportOptions options,
java.lang.String tag)
Utility method to invoke a report from another analyzer and include it in the current analyzer's report. |
protected void |
printEmbeddedReportWithOptions(IAnalysisReport out,
java.lang.String title,
java.lang.String analyzerName,
java.lang.Object parent,
IReportOptions options,
java.lang.String tag)
Utility method to invoke a report from another analyzer and include it in the current analyzer's report. |
protected void |
printReportInfoHeader(IAnalysisReport out)
Utility method to print a header for the current report, containing some basic information about the nature of this report. |
IAnalysisReport |
produceReport()
Generate a report which will be encapsulated in the IAnalysisReport object for later use by some formatter. |
protected static java.lang.Exception |
recordInternalExceptionStatic(java.lang.Exception e)
Record the fact that an exception was encountered during internal processing by an analysis object - at a time when we are not actively printing a report and hence no AnalysisReport object is available. |
void |
setContext(IAnalyzerContext analyzerContext)
Define the context associated with this analyzer instance. |
void |
setParent(java.lang.Object parent)
Set the parent object of which this analyzer bean represents some aspect (either a core DTFJ object or another analyzer bean). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleAnalyzerBean()
Method Detail |
---|
public final IAnalyzerContext getContext()
getContext
in interface IAnalyzerBase
IAnalyzerBase.getContext()
public final void setContext(IAnalyzerContext analyzerContext)
IAnalyzerBase
setContext
in interface IAnalyzerBase
analyzerContext
- - the context to be associated with this analyserIAnalyzerBase.setContext(com.ibm.dtfj.analyzer.ext.IAnalyzerContext)
public java.lang.String getName()
getName
in interface IAnalyzerBase
IAnalyzerBase.getName()
public java.lang.String getVersion()
IAnalyzerBase
getVersion
in interface IAnalyzerBase
IAnalyzerBase.getVersion()
public java.lang.String[] getCategories()
getCategories
in interface IAnalyzerBase
null
- "no category" should be indicated by an empty array or
an empty string.IAnalyzerBase.getCategories()
public java.lang.String getShortDescription()
IAnalyzerBase
getShortDescription
in interface IAnalyzerBase
IAnalyzerBase.getShortDescription()
public java.lang.String getLongDescription()
IAnalyzerBase
getLongDescription
in interface IAnalyzerBase
IAnalyzerBase.getLongDescription()
public boolean isPrimaryAnalyzer()
IAnalyzerBase
isPrimaryAnalyzer
in interface IAnalyzerBase
IAnalyzerBase.isPrimaryAnalyzer()
public java.lang.String getResourceBundleName()
com.ibm.dtfj.analyzer.util.TranslatableMessageLogger#getResourceBundleName()
public void setParent(java.lang.Object parent) throws java.lang.IllegalArgumentException
IWrapper
setParent
in interface IWrapper
parent
- The parent object to set. This parameter is specified as
type Object to enable a common factory, but the method should throw an
exception if the actual class of the parent object supplied is not
compatible with the particular type of analyzer bean that receives it.
java.lang.IllegalArgumentException
- thrown if the parent object supplied is not
compatible with the type of analyzer bean that receives itIWrapper.setParent(java.lang.Object)
public final java.lang.Object getParent()
IWrapper
This method may optionally be supplemented in subclasses by other methods that return the same parent object, but as a specific type suitable for each particular bean instead of as an Object, thereby providing more type checking at compile time.
getParent
in interface IWrapper
IWrapper.getParent()
public java.lang.String getIdentityString() throws com.ibm.dtfj.image.DTFJException
IWrapper
getIdentityString
in interface IWrapper
com.ibm.dtfj.image.DTFJException
IWrapper.getIdentityString()
public IAnalysisReport produceReport()
IReport
produceReport
in interface IReport
IReport.produceReport()
public int getCachingPriority()
IAnalyzerBase
getCachingPriority
in interface IAnalyzerBase
The implementation in the base class returns 5, meaning all analyzers
are cacheable by default when possible. This method should be overridden
in specific analyzers that do not wish to be cached or that wish to be cached
more aggressively.
protected static SimpleAnalyzerBean getInstance(IAnalyzerContext context, java.lang.String analyzerName, java.lang.Object parent)
context
- the analyzerContext in which to load the new analyzer objectanalyzerName
- name of the analyzer object to loadparent
- a parent analyzer for this new analyzer
protected static java.lang.Exception recordInternalExceptionStatic(java.lang.Exception e)
e
- the exception that was encountered
protected java.lang.Object getNextValidObject(java.util.Iterator it, java.lang.String desc, IAnalysisReport out)
it
- iterator from which to extract objectsdesc
- text message used to report errorsout
- AnalysisReport object used to report errors, or null if errors should be only be reported through
the logger
protected java.util.logging.Logger getLogger()
protected void printEmbeddedReportWithOptions(IAnalysisReport out, java.lang.String title, java.lang.String analyzerName, java.lang.Object parent, IReportOptions options, java.lang.String tag)
out
- a AnalysisReport in which the target analyzer's report must be addedtitle
- a title for the report to be includedanalyzerName
- name of target analyzer whose report is to be includeparent
- parent object for the target analyzeroptions
- ReportOptions to be used for the included reporttag
- a formatting tag for the title of this report, or nullprotected void printEmbeddedReportWithOptions(IAnalysisReport out, java.lang.String title, IReport target, IReportOptions options, java.lang.String tag)
out
- a AnalysisReport in which the target analyzer's report must be addedtitle
- a title for the report to be includedtarget
- an analyzer whose report is to be invokedoptions
- ReportOptions to be used for the included reporttag
- a formatting tag for the title of this report, or nullprotected void printEmbeddedReport(IAnalysisReport out, java.lang.String title, java.lang.String analyzerName, java.lang.Object parent, java.lang.String tag)
out
- a AnalysisReport in which the target analyzer's report must be addedtitle
- a title for the report to be includedanalyzerName
- name of target analyzer whose report is to be includeparent
- parent object for the target analyzertag
- a formatting tag for the title of this report, or nullprotected void printEmbeddedReport(IAnalysisReport out, java.lang.String title, IReport target, java.lang.String tag)
out
- a AnalysisReport in which the target analyzer's report must be addedtitle
- a title for the report to be includedtarget
- an analyzer whose report is to be invokedtag
- a formatting tag for the title of this report, or nullprotected void printReportInfoHeader(IAnalysisReport out)
out
- a AnalysisReport to receive the outputprotected IAnalysisReport allocateReport(java.lang.Object refKey)
refKey
- a reference key that can be used in calls to printIdent() that reference this report
protected IAnalysisReport allocateSecondaryReport(java.lang.String sectionName, java.lang.Object refKey)
sectionName
- the name for this sub-section in the main reportrefKey
- a reference key that can be used in calls to printIdent() that reference this report
protected static IReportOptions allocateReportOptions()
protected static ReportExtensionHelper getReportExtensionHelper()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |