com.ibm.dtfj.analyzer.ext
Interface IWrapper

All Known Implementing Classes:
AllBytecodeMethods, AllCompiledMethods, AllEnvVars, AllImageThreads, AllJavaClassLoaders, AllJavaHeaps, AllJavaMonitors, AllJavaThreads, AllJVMInitArgs, AllJVMInitArgs, AllJVMInitArgs, AllLibraries, AllMemorySections, ArrayListWrapper, ArrayListWrapper, ArrayWrapper, CharArrayWrapper, ClassFinder, CollectionAnalyzerBase, CollectionWrapperBase, DateWrapper, HashMapWrapper, HashMapWrapper, HashSetWrapper, HashSetWrapper, HashtableWrapper, LinkedListWrapper, LinkedListWrapper, ListClassDefinitions, ListObjectInstances, ListObjectInstancesWithSubClasses, LongTimestampWrapper, LookupObjectByAddress, MapEntryWrapperBase, MapWrapperBase, ObjectFinder, ObjectNavigator, ObjectNavigatorCollection, ObjectWrapper, ObjectWrapperCollection, OneContextHeader, OneImage, OneImage, OneImage, OneImageModule, OneImageProcess, OneImageSection, OneImageSection, OneImageStackFrame, OneImageThread, OneJavaClass, OneJavaClassLoader, OneJavaHeap, OneJavaMethod, OneJavaMonitor, OneJavaMonitor, OneJavaMonitor, OneJavaObject, OneJavaObject, OneJavaRuntime, OneJavaStackFrame, OneJavaThread, PropertiesWrapper, PropertiesWrapper, SectionsTableBase, SimpleAnalyzerBean, StringWrapper, SynchronizedMapWrapper, SynchronizedSetWrapper, ThreadLocalWrapper, TreeMapWrapper, TreeSetWrapper, TreeSetWrapper, ValueWrapper, VectorWrapper

public interface IWrapper

This Interface gives an analyser the ability to serve as a wrapper or proxy for some other object, such as a lower-level DTFJ object or another analyzer. If an analyzer implements this interface then in general it should be built by calling Analyser loadAnalyser(name, parent). If an attempt is made to create a 'wrapper' analyser using the loadAnalyser(name) or one of the other interfaces such as runAnalyser(name) then the analyser will be created with a null parent. This enables the use of a hierarchy of analysers, and fine-grained analysers that augment individual DTFJ objects. A complex analyser that operates on many objects at once could simply have the whole JavaRuntime as its parent.


Method Summary
 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().
 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).
 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).
 

Method Detail

setParent

void setParent(java.lang.Object parent)
               throws java.lang.IllegalArgumentException
Set the parent object of which this analyzer bean represents some aspect (either a core DTFJ object or another analyzer bean). This method should normally be overridden in subclasses to implement type-checking suitable for each type of analyzer bean.

Parameters:
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.
Throws:
java.lang.IllegalArgumentException - thrown if the parent object supplied is not compatible with the type of analyzer bean that receives it

getParent

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).

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.

Returns:
the parent object, as an Object

getIdentityString

java.lang.String getIdentityString()
                                   throws com.ibm.dtfj.image.DTFJException
Provide a way for an analyzer to specify a customized identity string, that will be used in report references created with IAnalysisReport.printIdent(). If this method returns null (which should be the default for most analyzers), then the system will create an identity string derived from the identity string of the parent object, using default rules.

Returns:
the custom identity string for this analyzer instance, or null if the system default should be used
Throws:
com.ibm.dtfj.image.DTFJException


© Copyright IBM Corp. 2007, 2008 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.