ij-16.png   inspectorJ -- JavaTM Profiler
sf project site browse source checkout source
SourceForge.net Logo



inspectorj::toolset::ClassToolSet Class Reference

#include <classtoolset.h>

Collaboration diagram for inspectorj::toolset::ClassToolSet:

Collaboration graph
[legend]
List of all members.

Detailed Description

ClassToolSet encapsulates a set of tools for profiling and presenting java classes in the remote VM.

Definition at line 52 of file classtoolset.h.

Public Slots

void getAllLoadedClasses ()
 Requests reference types for all classes currently loaded by the target VM.
void getClassDetails (const QModelIndex &)
 Request details for the class at the specified index.
void disassembleBytecodes (const QModelIndex &, bool, bool, bool, bool, bool)
 Gets the bytecodes based on the given parameters.

Signals

void tableModelReady ()
 This signal is emitted when the class table model is initialized and is ready for display.
void treeModelReady ()
 This signal is emitted when the tree model is ready for display.
void bytecodesReady ()
 This signal is emitted when bytecodes are ready to disply.

Public Member Functions

 ClassToolSet (ConnectionManager &, SessionProfile **=0)
 Constructor.
 ~ClassToolSet ()
 Destructor.
ClassTableModelgetClassTableModel ()
 Returns the class table model.
ClassTreeModelgetClassTreeModel ()
 Returns the class tree model.
void prepareBytecodeOutput (QTextDocument *)

Private Slots

void getBytecodeString (JDWPPacket &)

Private Member Functions

void createActions ()
 Create Actions.
void setupConnections ()
 Set up connections.

Private Attributes

QString javapOutput
ClassTableModelclassTableModel
 Table model for display.
ClassTreeModelclassTreeModel
 Tree model for display.
JDWPActionupdateClassFieldsAction
 Actions.
JDWPActionupdateClassMethodsAction
JDWPActiontableModelAction
JDWPActionbyteCodesAction
ConnectionManagerconnection
 Reference to the connection manager.
SessionProfile ** profile
 pointer to the session profiler
QVector< JavaClass * > classes
 Index based storage of classes.
QMap< qint64, JavaClass * > classMap
 Key based storage of classes.


Constructor & Destructor Documentation

inspectorj::toolset::ClassToolSet::ClassToolSet ( ConnectionManager connectionManager,
SessionProfile **  prof = 0 
)

Constructor.

Parameters:
connectionManager A ConnectionManager reference that provides access to the underlying socket connection.
prof Pointer to the currently loaded SessionProfile

Definition at line 45 of file classtoolset.cpp.

References classes, classTableModel, classTreeModel, createActions(), profile, and setupConnections().

inspectorj::toolset::ClassToolSet::~ClassToolSet (  ) 

Destructor.

Definition at line 78 of file classtoolset.cpp.

References classTableModel, and tableModelAction.


Member Function Documentation

ClassTableModel * inspectorj::toolset::ClassToolSet::getClassTableModel (  ) 

Returns the class table model.

Definition at line 142 of file classtoolset.cpp.

References classTableModel.

Referenced by inspectorj::client::InspectorJ::updateClassTable().

ClassTreeModel * inspectorj::toolset::ClassToolSet::getClassTreeModel (  ) 

Returns the class tree model.

Definition at line 150 of file classtoolset.cpp.

References classTreeModel.

Referenced by inspectorj::client::InspectorJ::updateClassTree().

void inspectorj::toolset::ClassToolSet::tableModelReady (  )  [signal]

This signal is emitted when the class table model is initialized and is ready for display.

Referenced by setupConnections().

void inspectorj::toolset::ClassToolSet::treeModelReady (  )  [signal]

This signal is emitted when the tree model is ready for display.

Referenced by getClassDetails().

void inspectorj::toolset::ClassToolSet::bytecodesReady (  )  [signal]

This signal is emitted when bytecodes are ready to disply.

Referenced by getBytecodeString().

void inspectorj::toolset::ClassToolSet::getAllLoadedClasses (  )  [slot]

Requests reference types for all classes currently loaded by the target VM.

Definition at line 90 of file classtoolset.cpp.

References classes, classMap, connection, inspectorj::jdwp::JDWPCommand::newCommand(), inspectorj::client::ConnectionManager::sendRequest(), and tableModelAction.

void inspectorj::toolset::ClassToolSet::getClassDetails ( const QModelIndex &   )  [slot]

Request details for the class at the specified index.

Definition at line 102 of file classtoolset.cpp.

References classes, classMap, classTreeModel, connection, inspectorj::jdwp::JDWPCommand::newCommand(), inspectorj::client::ConnectionManager::sendRequest(), inspectorj::model::ClassTreeModel::setJavaClass(), treeModelReady(), updateClassFieldsAction, and updateClassMethodsAction.

void inspectorj::toolset::ClassToolSet::disassembleBytecodes ( const QModelIndex &  index,
bool  disassemble,
bool  lineNumbers,
bool  fld,
bool  internal,
bool  verbose 
) [slot]

Gets the bytecodes based on the given parameters.

Parameters:
selectionModel The selectionModel for the selected java class
disassemble flag to indicate whether to disassemble the bytecodes
lineNumbers flag to indicate whether to show lineNumbers & local variable table
fld flag to indicate whether to show fields
internal flag to indicate whether to print internal type signatures
verbose flag to print stack size, number of locals and args for methods

Definition at line 164 of file classtoolset.cpp.

References byteCodesAction, classes, connection, inspectorj::client::ConnectionManager::isAttached(), javapOutput, inspectorj::jdwp::JDWPCommand::newCommand(), and inspectorj::client::ConnectionManager::sendRequest().

Referenced by inspectorj::client::InspectorJ::disassembleBytecodes().

void inspectorj::toolset::ClassToolSet::createActions (  )  [private]

Create Actions.

Definition at line 57 of file classtoolset.cpp.

References byteCodesAction, tableModelAction, updateClassFieldsAction, and updateClassMethodsAction.

Referenced by ClassToolSet().

void inspectorj::toolset::ClassToolSet::setupConnections (  )  [private]

Set up connections.

Definition at line 68 of file classtoolset.cpp.

References byteCodesAction, classTableModel, getBytecodeString(), tableModelAction, and tableModelReady().

Referenced by ClassToolSet().


Member Data Documentation

ClassTableModel* inspectorj::toolset::ClassToolSet::classTableModel [private]

Table model for display.

Definition at line 90 of file classtoolset.h.

Referenced by ClassToolSet(), getClassTableModel(), setupConnections(), and ~ClassToolSet().

ClassTreeModel* inspectorj::toolset::ClassToolSet::classTreeModel [private]

Tree model for display.

Definition at line 93 of file classtoolset.h.

Referenced by ClassToolSet(), getClassDetails(), and getClassTreeModel().

JDWPAction* inspectorj::toolset::ClassToolSet::updateClassFieldsAction [private]

Actions.

Definition at line 96 of file classtoolset.h.

Referenced by createActions(), and getClassDetails().

ConnectionManager& inspectorj::toolset::ClassToolSet::connection [private]

Reference to the connection manager.

Definition at line 102 of file classtoolset.h.

Referenced by disassembleBytecodes(), getAllLoadedClasses(), getBytecodeString(), and getClassDetails().

SessionProfile** inspectorj::toolset::ClassToolSet::profile [private]

pointer to the session profiler

Definition at line 105 of file classtoolset.h.

Referenced by ClassToolSet().

QVector<JavaClass*> inspectorj::toolset::ClassToolSet::classes [private]

Index based storage of classes.

Definition at line 108 of file classtoolset.h.

Referenced by ClassToolSet(), disassembleBytecodes(), getAllLoadedClasses(), and getClassDetails().

QMap<qint64, JavaClass*> inspectorj::toolset::ClassToolSet::classMap [private]

Key based storage of classes.

Definition at line 111 of file classtoolset.h.

Referenced by getAllLoadedClasses(), and getClassDetails().


The documentation for this class was generated from the following files:
Generated on Sun Aug 19 17:08:19 2007 for inspectorJ by  doxygen 1.5.1