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



inspectorj::toolset::ToolSetUtils Class Reference

#include <toolsetutils.h>

List of all members.


Detailed Description

ToolSetUtils encapsulates general purpose utilites for all toolsets.

Definition at line 43 of file toolsetutils.h.

Public Member Functions

 ToolSetUtils ()
 Constructor.
 ~ToolSetUtils ()
 Destructor.

Static Public Member Functions

static void createClassFilter (QRegExp &, QString)
 Create a Regular Expression class filter based on the filter string.
static QString & normalizeClassSignature (QString &)
 Removes the JNI specifics from a class signature.
static QString & createJNIClassSignature (QString &)
 Creates a JNI signature from a normalized class signature.
static QString & normalizeMethodSignature (QString &, QString &, QString classname=QString(""))
 This function converts a JNI method signature into a standard Java format.

Static Public Attributes

static QRegExp JNI_CLASS_START
 QRegExp that matches the start of a JNI class signature.
static QRegExp JNI_REFERENCE_START
 QRegExp that matches the start of a JNI class or primitive signature.
static QRegExp JNI_CLASS_END
 QRegExp that matches the end of a JNI class signature.
static QString SINGLE_STAR
 QString "*".
static QString DOUBLE_STAR
 QString "**".
static QChar ARRAY_DESIGNATOR
 JNI Array Designator "[".
static QString BRACKETS
 Array brackets, QString "[]".
static QString JNI_PACKAGE_SEPARATOR
 JNI Package Separator, QString "/".
static QString DOT
 QString ".".
static QString WILDCARD
 Wildcard string used to build regexp classfilters QString "[^/]*".
static QString GREEDY_WILDCARD
 Greedy Wildcard string used to build regexp classfilters QString ".*".
static QString GREEDY_WILDCARD_TEMP
 Temporary placeholder for a GREEDY_WILDCARD.
static QString DOLLAR_SIGN
 QString "$".


Constructor & Destructor Documentation

inspectorj::toolset::ToolSetUtils::ToolSetUtils (  ) 

Constructor.

Definition at line 53 of file toolsetutils.cpp.

inspectorj::toolset::ToolSetUtils::~ToolSetUtils (  ) 

Destructor.

Definition at line 61 of file toolsetutils.cpp.


Member Function Documentation

void inspectorj::toolset::ToolSetUtils::createClassFilter ( QRegExp &  regexp,
QString  filterString 
) [static]

Create a Regular Expression class filter based on the filter string.

A filter string has the form: 'java.io.*' or 'org.apache.*.*.*Request*'. A '*' matches any character except '.' therefore '*' will NOT match multiple packages. For example java.awt.* will match java.awt.AWTEvent but will not match java.awt.event.ActionEvent.

To match across multiple package names, use the greedy double star wildcard '**': java.awt.** will match both java.awt.AWTEvent and java.awt.event.ActionEvent.

Parameters:
regexp A QRegExp reference to hold the class filter.
filterString A filter string used to construct a RegExp filter.

Definition at line 201 of file toolsetutils.cpp.

References DOLLAR_SIGN, DOT, DOUBLE_STAR, GREEDY_WILDCARD, GREEDY_WILDCARD_TEMP, JNI_PACKAGE_SEPARATOR, SINGLE_STAR, and WILDCARD.

Referenced by inspectorj::model::ClassTableModel::initModel().

QString & inspectorj::toolset::ToolSetUtils::normalizeClassSignature ( QString &  signature  )  [static]

Removes the JNI specifics from a class signature.

Parameters:
signature The JNI class signature.
Returns:
The reference to the normalized class signature.

Definition at line 70 of file toolsetutils.cpp.

References ARRAY_DESIGNATOR, BRACKETS, DOT, JNI_CLASS_END, JNI_CLASS_START, JNI_PACKAGE_SEPARATOR, and JNI_REFERENCE_START.

Referenced by inspectorj::agent::commandset::BytecodeCmdSet::disassembleBytecodes(), inspectorj::model::ClassTableModel::initModel(), normalizeMethodSignature(), and inspectorj::model::JavaClass::setFields().

QString & inspectorj::toolset::ToolSetUtils::createJNIClassSignature ( QString &  signature  )  [static]

Creates a JNI signature from a normalized class signature.

Parameters:
signature The normalized class signature.
Returns:
A reference to the JNI signature.

Definition at line 181 of file toolsetutils.cpp.

References DOT, and JNI_PACKAGE_SEPARATOR.

QString & inspectorj::toolset::ToolSetUtils::normalizeMethodSignature ( QString &  signature,
QString &  methodName,
QString  className = QString("") 
) [static]

This function converts a JNI method signature into a standard Java format.

The JNI method signature: (IDLjava/lang/Thread;)Ljava/lang/Object; will be normalized to: Object methodName(int, double, java.lang.Thread)

Parameters:
signature The JNI method signature.
methodName The name of the method to be normalized. The JNI signature does NOT include the method name.
className. The name of the class containing the method. If this in a non empty string, then constructors indicated by <init> will be replaced by the classname.
Returns:
A reference to the normalized method signature.

Definition at line 110 of file toolsetutils.cpp.

References BRACKETS, and normalizeClassSignature().

Referenced by inspectorj::agent::commandset::BytecodeCmdSet::disassembleBytecodes(), and inspectorj::model::JavaClass::setMethods().


Member Data Documentation

QRegExp inspectorj::toolset::ToolSetUtils::JNI_CLASS_START [static]

QRegExp that matches the start of a JNI class signature.

Definition at line 50 of file toolsetutils.h.

Referenced by normalizeClassSignature().

QRegExp inspectorj::toolset::ToolSetUtils::JNI_REFERENCE_START [static]

QRegExp that matches the start of a JNI class or primitive signature.

Definition at line 53 of file toolsetutils.h.

Referenced by normalizeClassSignature().

QRegExp inspectorj::toolset::ToolSetUtils::JNI_CLASS_END [static]

QRegExp that matches the end of a JNI class signature.

Definition at line 56 of file toolsetutils.h.

Referenced by normalizeClassSignature().

QString inspectorj::toolset::ToolSetUtils::SINGLE_STAR [static]

QString "*".

Definition at line 59 of file toolsetutils.h.

Referenced by createClassFilter().

QString inspectorj::toolset::ToolSetUtils::DOUBLE_STAR [static]

QString "**".

Definition at line 62 of file toolsetutils.h.

Referenced by createClassFilter().

QChar inspectorj::toolset::ToolSetUtils::ARRAY_DESIGNATOR [static]

JNI Array Designator "[".

Definition at line 65 of file toolsetutils.h.

Referenced by normalizeClassSignature().

QString inspectorj::toolset::ToolSetUtils::BRACKETS [static]

Array brackets, QString "[]".

Definition at line 68 of file toolsetutils.h.

Referenced by normalizeClassSignature(), and normalizeMethodSignature().

QString inspectorj::toolset::ToolSetUtils::JNI_PACKAGE_SEPARATOR [static]

JNI Package Separator, QString "/".

Definition at line 71 of file toolsetutils.h.

Referenced by createClassFilter(), createJNIClassSignature(), and normalizeClassSignature().

QString inspectorj::toolset::ToolSetUtils::DOT [static]

QString ".".

Definition at line 74 of file toolsetutils.h.

Referenced by createClassFilter(), createJNIClassSignature(), and normalizeClassSignature().

QString inspectorj::toolset::ToolSetUtils::WILDCARD [static]

Wildcard string used to build regexp classfilters QString "[^/]*".

Definition at line 78 of file toolsetutils.h.

Referenced by createClassFilter().

QString inspectorj::toolset::ToolSetUtils::GREEDY_WILDCARD [static]

Greedy Wildcard string used to build regexp classfilters QString ".*".

Definition at line 82 of file toolsetutils.h.

Referenced by createClassFilter().

QString inspectorj::toolset::ToolSetUtils::GREEDY_WILDCARD_TEMP [static]

Temporary placeholder for a GREEDY_WILDCARD.

Definition at line 85 of file toolsetutils.h.

Referenced by createClassFilter().

QString inspectorj::toolset::ToolSetUtils::DOLLAR_SIGN [static]

QString "$".

Definition at line 88 of file toolsetutils.h.

Referenced by createClassFilter().


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