|
|||||||||
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.OneJavaClass
public class OneJavaClass
Print and extract basic information about one DTFJ JavaClass object
List all the fields, list all the object references, lookup a given field
Determine other attributes of the class (e.g. isPrimitive(), getTypeSignature(), etc.).
Constructor Summary | |
---|---|
OneJavaClass()
Null constructor for use as JavaBean |
Method Summary | |
---|---|
java.util.Iterator |
getAllVisibleFields()
|
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. |
long |
getChecksum()
Generate a checksum of this class, to help distinguish between different implementations of the same class loaded in the same image |
com.ibm.dtfj.java.JavaObject[] |
getConstantPoolReferences(boolean includeSuperclasses)
Find all the constant pools references from this JavaClass. |
static OneJavaClass |
getInstance(IAnalyzerContext context,
com.ibm.dtfj.java.JavaClass parent)
Find the OneJavaClass bean instance associated with a given parent JavaClass (create it if necessary) |
com.ibm.dtfj.java.JavaField |
getJavaField(java.lang.String name,
boolean includeSuperclasses)
Find the JavaField object associated with a given field name for this class |
java.util.Iterator |
getLocalFields()
|
ValueWrapper |
getStaticFieldValue(java.lang.String name,
boolean includeSuperclasses)
Return the value of a given static field in this class, as an arbitrary Object type encapsulated in a ValueWrapper. |
com.ibm.dtfj.java.JavaObject[] |
getStaticReferences(boolean includeSuperclasses)
Find all the static references from this JavaClass. |
java.lang.String |
getTypeSignature()
Get the canonical type signature for this JavaClass. |
static java.lang.String |
getTypeSignature(com.ibm.dtfj.java.JavaClass cls)
Get the canonical type signature of a given JavaClass. |
boolean |
isClass()
Check if this JavaClass represents the java.lang.Class object type. |
static boolean |
isClass(com.ibm.dtfj.java.JavaClass cls)
Check if a given JavaClass represents the java.lang.Class object type. |
boolean |
isPrimitive()
Check if this JavaClass represents a primitive type. |
static boolean |
isPrimitive(com.ibm.dtfj.java.JavaClass cls)
Check if a given JavaClass represents a primitive type. |
void |
printOneFieldInfo(IAnalysisReport out,
com.ibm.dtfj.java.JavaField f)
Print a summary of the information about a field (signature + modifiers) |
void |
printStaticFields(IAnalysisReport out)
Print all the static fields defined in this JavaClass 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 JavaClass 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 OneJavaClass()
Method Detail |
---|
public static OneJavaClass getInstance(IAnalyzerContext context, com.ibm.dtfj.java.JavaClass parent)
context
- the AnalyzerContext in which to locate this bean instanceparent
- the parent JavaClass 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 JavaClass.
compatible with the type of analyzer bean that receives itIWrapper.setParent(java.lang.Object)
public int getCachingPriority()
IAnalyzerBase
getCachingPriority
in interface IAnalyzerBase
getCachingPriority
in class SimpleAnalyzerBean
This method returns a high value, to encourage caching of this type of analyzer.
public static boolean isPrimitive(com.ibm.dtfj.java.JavaClass cls)
cls
- the JavaClass instance to check
public boolean isPrimitive()
public static java.lang.String getTypeSignature(com.ibm.dtfj.java.JavaClass cls)
cls
- the JavaClass instance for which we want the type signature
public java.lang.String getTypeSignature()
public static boolean isClass(com.ibm.dtfj.java.JavaClass cls)
cls
- the JavaClass instance to check
public boolean isClass()
public com.ibm.dtfj.java.JavaField getJavaField(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 getStaticFieldValue(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 com.ibm.dtfj.java.JavaObject[] getStaticReferences(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 com.ibm.dtfj.java.JavaObject[] getConstantPoolReferences(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.util.Iterator getAllVisibleFields() throws com.ibm.dtfj.image.DTFJException
com.ibm.dtfj.image.DTFJException
public java.util.Iterator getLocalFields() 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()
public void printStaticFields(IAnalysisReport out)
out
- a AnalysisReport object to which to write the outputpublic void printOneFieldInfo(IAnalysisReport out, com.ibm.dtfj.java.JavaField f)
out
- a AnalysisReport object to which to write the outputf
- the JavaField for which we want informationpublic long getChecksum() throws com.ibm.dtfj.image.DTFJException
com.ibm.dtfj.image.DTFJException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |