|
|||||||||
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
com.ibm.dtfj.analyzer.helpers.objectwrapper.ClassFinder
public class ClassFinder
Find all the java.lang.Class objects associated with a particular class in the Java runtime
Print and count all the classes within the Java runtime
Given an instance of java.lang.Class, determine which class it defines.
Note that this analyzer is based on scanning through all the classloaders. In various JVM implementations, there may be some classes, in particular array classes, that are not normally found on the list of classloaders. These classes cannot be found by this analyzer.
Constructor Summary | |
---|---|
ClassFinder()
Null constructor for use as JavaBean |
Method Summary | |
---|---|
java.util.Set |
findAllSubClasses(java.lang.String clsname)
Find all the subclasses (direct and indirect, i.e. subclasses of subclasses) of the given class, or all the sub-interfaces and implementations of the given interface. |
java.util.Set |
findAllSubClassesByObjectID(com.ibm.dtfj.image.ImagePointer id)
Find all the subclasses (direct and indirect, i.e. subclasses of subclasses) of the given class, or all the sub-interfaces and implementations of the given interface. |
com.ibm.dtfj.java.JavaClass |
findClassByClassID(com.ibm.dtfj.image.ImagePointer clsid)
Given the class ID (address) of a JavaClass, find the corresponding JavaClass |
com.ibm.dtfj.java.JavaClass |
findClassByObjectID(com.ibm.dtfj.image.ImagePointer id)
Given the object ID (address) of a JavaObject that happens to be an instance of java.lang.Class, find the corresponding class (JavaClass) that this object represents. |
java.util.Set |
findClasses(java.lang.String clsname)
Find all the class objects for a given class or interface name |
java.util.Set |
findDirectSubClasses(java.lang.String clsname)
Find all the direct subclasses of the given class, or all the sub-interfaces and implementations of the given interface. |
java.util.Set |
findDirectSubClassesByObjectID(com.ibm.dtfj.image.ImagePointer id)
Find all the direct subclasses of the given class, or all the sub-interfaces and implementations of the given interface. |
int |
getCachingPriority()
Force caching of this analyzer |
int |
getCountClasses()
|
static ClassFinder |
getInstance(IAnalyzerContext context,
com.ibm.dtfj.java.JavaRuntime parent)
Find the ClassFinder bean instance associated with a given parent JavaRuntime (create it if necessary) |
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. |
void |
printOneClass(IAnalysisReport out,
java.lang.String clsname)
Print all the class objects for a given class name, as a segment of a report |
IAnalysisReport |
produceReport()
Generate a report which will be encapsulated in the IAnalysisReport object for later use by some formatter. |
void |
setParent(java.lang.Object parent)
Set the parent JavaRuntime underlying this analyzer bean. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassFinder()
Method Detail |
---|
public java.lang.String getVersion()
IAnalyzerBase
getVersion
in interface IAnalyzerBase
getVersion
in class SimpleAnalyzerBean
IAnalyzerBase.getVersion()
public java.lang.String getShortDescription()
IAnalyzerBase
getShortDescription
in interface IAnalyzerBase
getShortDescription
in class SimpleAnalyzerBean
IAnalyzerBase.getShortDescription()
public boolean isPrimaryAnalyzer()
IAnalyzerBase
isPrimaryAnalyzer
in interface IAnalyzerBase
isPrimaryAnalyzer
in class SimpleAnalyzerBean
IAnalyzerBase.isPrimaryAnalyzer()
public static ClassFinder getInstance(IAnalyzerContext context, com.ibm.dtfj.java.JavaRuntime parent)
context
- the AnalyzerContext in which to locate this bean instanceparent
- the parent JavaRuntime underlying this analyzer bean
public void setParent(java.lang.Object parent)
setParent
in interface IWrapper
setParent
in class SimpleAnalyzerBean
parent
- The parent object to set. Must be of type JavaRuntime.
compatible with the type of analyzer bean that receives itIWrapper.setParent(java.lang.Object)
public int getCachingPriority()
getCachingPriority
in interface IAnalyzerBase
getCachingPriority
in class SimpleAnalyzerBean
SimpleAnalyzerBean.getCachingPriority()
public java.util.Set findClasses(java.lang.String clsname) throws com.ibm.dtfj.image.DTFJException
clsname
- the class or interface name for which we want to find class objects
com.ibm.dtfj.image.DTFJException
public java.util.Set findDirectSubClasses(java.lang.String clsname) throws com.ibm.dtfj.image.DTFJException
clsname
- the name of the class for which we want to find subclasses
com.ibm.dtfj.image.DTFJException
public java.util.Set findAllSubClasses(java.lang.String clsname) throws com.ibm.dtfj.image.DTFJException
clsname
- the name of the class or interface for which we want to find subclasses
com.ibm.dtfj.image.DTFJException
public void printOneClass(IAnalysisReport out, java.lang.String clsname)
out
- a AnalysisReport object to which to write the outputclsname
- the class name for which we want to find class objectspublic com.ibm.dtfj.java.JavaClass findClassByObjectID(com.ibm.dtfj.image.ImagePointer id) throws com.ibm.dtfj.image.DTFJException
id
- object ID of a JavaObject that is an instance of java.lang.Class
com.ibm.dtfj.image.DTFJException
public com.ibm.dtfj.java.JavaClass findClassByClassID(com.ibm.dtfj.image.ImagePointer clsid) throws com.ibm.dtfj.image.DTFJException
clsid
- class ID of a JavaClass
com.ibm.dtfj.image.DTFJException
public java.util.Set findDirectSubClassesByObjectID(com.ibm.dtfj.image.ImagePointer id) throws com.ibm.dtfj.image.DTFJException
id
- ID of a JavaObject that is an instance of java.lang.Class from which we want the subclasses
com.ibm.dtfj.image.DTFJException
public java.util.Set findAllSubClassesByObjectID(com.ibm.dtfj.image.ImagePointer id) throws com.ibm.dtfj.image.DTFJException
id
- ID of a JavaObject that is an instance of java.lang.Class from which we want the subclasses
com.ibm.dtfj.image.DTFJException
public int getCountClasses() throws com.ibm.dtfj.image.DTFJException
com.ibm.dtfj.image.DTFJException
public IAnalysisReport produceReport()
IReport
produceReport
in interface IReport
produceReport
in class SimpleAnalyzerBean
IReport.produceReport()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |