|
|||||||||
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.OneJavaObject
public class OneJavaObject
Print and extract basic information about one DTFJ JavaObject
List all the fields, list all the object references, lookup a given field.
Constructor Summary | |
---|---|
OneJavaObject()
Null constructor for use as JavaBean |
Method Summary | |
---|---|
int |
getCachingPriority()
Avoid caching OneJavaObject objects (there are too many of them, and they are cheap to re-create) |
ValueWrapper |
getFieldValue(java.lang.String name,
boolean includeSuperclasses)
Return the value of a given field in this object instance, as an arbitrary Object type encapsulated in a ValueWrapper. |
ValueWrapper |
getFieldValue(java.lang.String name,
java.lang.String className)
Return the value of a given field in this object instance from a given class in the hierarchy, as an arbitrary Object type encapsulated in a ValueWrapper. |
static OneJavaObject |
getInstance(IAnalyzerContext context,
com.ibm.dtfj.java.JavaObject parent)
Find the OneJavaObject bean instance associated with a given parent JavaObject (create it if necessary) |
com.ibm.dtfj.java.JavaObject |
getJavaObject()
|
OneJavaClass |
getOneJavaClass()
|
com.ibm.dtfj.java.JavaObject[] |
getReferences(boolean includeSuperclasses)
Find all the object references from this object. |
java.lang.String |
getTypeSignature()
Get the canonical type signature for this object. |
boolean |
isNull()
Check if a given JavaObject represents a null object instance (some null object instances may be represented by a dummy JavaObject XXX This might be changed in a future API revision) |
static boolean |
isNull(com.ibm.dtfj.java.JavaObject obj)
Check if a given JavaObject represents a null object instance (some null object instances may be represented by a dummy JavaObject XXX This might be changed in a future API revision) Static method to avoid the overhead of allocating an object |
protected void |
printBasic(IAnalysisReport out)
Print the basic information related to this JavaObject as a segment of a report (whatever is not included in the extended description shown by printDesc()) |
void |
printFields(IAnalysisReport out,
boolean includeSuperclasses)
Print all the fields defined in this JavaObject and their value, 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 JavaObject 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 OneJavaObject()
Method Detail |
---|
public static OneJavaObject getInstance(IAnalyzerContext context, com.ibm.dtfj.java.JavaObject parent)
context
- the AnalyzerContext in which to locate this bean instanceparent
- the parent JavaObject 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 JavaObject.
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 com.ibm.dtfj.java.JavaObject getJavaObject()
public static boolean isNull(com.ibm.dtfj.java.JavaObject obj)
obj
- the JavaObject to check
public boolean isNull()
public OneJavaClass getOneJavaClass() throws com.ibm.dtfj.image.DTFJException
com.ibm.dtfj.image.DTFJException
public ValueWrapper getFieldValue(java.lang.String name, boolean includeSuperclasses) throws com.ibm.dtfj.image.DTFJException
name
- the field name that we are looking forincludeSuperclasses
- if true look for fields in this class and all its superclasses;
if false, only look for fields declared in this class itself.
com.ibm.dtfj.image.DTFJException
- if the field is not foundpublic ValueWrapper getFieldValue(java.lang.String name, java.lang.String className) throws com.ibm.dtfj.image.DTFJException
name
- the field name that we are looking forclassName
- the name of the class (which must be a superclass of this object's class from
which we want to read the field
com.ibm.dtfj.image.DTFJException
- if the field is not foundpublic com.ibm.dtfj.java.JavaObject[] getReferences(boolean includeSuperclasses) throws com.ibm.dtfj.image.DTFJException
includeSuperclasses
- if true look for fields in this class and all its superclasses;
if false, only look for fields declared in this class itself.
com.ibm.dtfj.image.DTFJException
public java.lang.String getTypeSignature() 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()
protected void printBasic(IAnalysisReport out)
out
- a AnalysisReport object to which to write the outputpublic void printFields(IAnalysisReport out, boolean includeSuperclasses)
out
- a AnalysisReport object to which to write the outputincludeSuperclasses
- true if should recurse and print all the fields from the super class, and so on
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |