![]() |
|
|
#include <toolsetutils.h>
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 "$". |
inspectorj::toolset::ToolSetUtils::ToolSetUtils | ( | ) |
inspectorj::toolset::ToolSetUtils::~ToolSetUtils | ( | ) |
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.
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.
signature | The JNI 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.
signature | The normalized class 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)
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. |
Definition at line 110 of file toolsetutils.cpp.
References BRACKETS, and normalizeClassSignature().
Referenced by inspectorj::agent::commandset::BytecodeCmdSet::disassembleBytecodes(), and inspectorj::model::JavaClass::setMethods().
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 inspectorj::toolset::ToolSetUtils::DOUBLE_STAR [static] |
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] |