|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dtfj.analyzer.util.ThreadFilter
public class ThreadFilter
Some simple utility methods to subset the various entities in a Java runtime. They are intended to be used as a filter pipe so we start with the iterator over all threads and then filter out threads which match given patterns. When doing String matching this class can operate either in simple matching mode or in regular expression mode. In simple mode we employ a simple pattern syntax in which the wildcard characters *,? and # can be used to indicate matching. A ? will match any character, a # will match any numeric char (0-9) and a * will match any number of characters. Thus ?* matches "Some","No", "n", but does NOT match "" #* matches "1Some","0No", "7", but does NOT match "" or "L" In regular expression mode we use the Java regular expressions which are similar to Perl and POSIX except in some corner cases.
Constructor Summary | |
---|---|
ThreadFilter()
Build a thread filter where matching is done by a simple matcher which understands the wildcard characters *, ? |
|
ThreadFilter(boolean regularExpressionMatching)
Build a thread filter and control the matching which can be done either by a simple matcher which understands the wildcard characters *, ? |
Method Summary | |
---|---|
java.lang.String |
decodeModifiers(int mod)
Decode the modifiers into a string form |
IAnalysisReport |
print(java.lang.String title,
java.util.Iterator list,
int depth,
IAnalyzerBase a)
A utility print method which will produce a titled report that shows the items in the given iterator which should in general all be of the same class. |
java.util.Iterator |
threadsByDepth(java.util.Iterator thrds,
int depth,
boolean deeper,
IAnalyzerBase a)
Return a subset of the threads which match the depth constraint specified by the parameters. |
java.util.Iterator |
threadsByName(java.util.Iterator thrds,
java.lang.String name,
IAnalyzerBase a)
Return a subset of the threads whose name matches the given pattern. |
java.util.Iterator |
threadsInMethods(java.util.Iterator thrds,
java.lang.String cls,
java.lang.String met,
int depth,
IAnalyzerBase a)
Return a subset of the threads which are currently in methods matching a pattern of class name, method name and stack depth. |
java.util.Iterator |
threadsInNativeMethods(java.util.Iterator thrds,
int depth,
IAnalyzerBase a)
Return a subset of the threads which are currently in native methods |
java.util.Iterator |
threadsWithNativeThreadsIn(java.util.Iterator input,
java.lang.String lib,
java.lang.String proc,
int depth,
IAnalyzerBase a)
Return a subset of the threads which are associated with native threads that are currently in native methods matching a pattern of procedure name and stack depth. |
void |
useRegularExpressionMatchingSyntax()
When doing string matching use full regular expression processing. |
void |
useSimpleMatchingSyntax()
When doing string matching use a simple matching syntax in which the wildcard characters *,? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThreadFilter()
public ThreadFilter(boolean regularExpressionMatching)
regularExpressionMatching
- Method Detail |
---|
public void useSimpleMatchingSyntax()
public void useRegularExpressionMatchingSyntax()
public java.util.Iterator threadsByName(java.util.Iterator thrds, java.lang.String name, IAnalyzerBase a)
thrds
- list of threads to be subsetname
- pattern which must match the thread namea
- the current analyzer
public java.util.Iterator threadsByDepth(java.util.Iterator thrds, int depth, boolean deeper, IAnalyzerBase a)
thrds
- list of threads to be subsetdepth
- stack depth to be tested against the actual depthdeeper
- if true we return threads with stacks deeper than depth
else return threads with depth less than or equal to deptha
- the current analyzer
public java.util.Iterator threadsInMethods(java.util.Iterator thrds, java.lang.String cls, java.lang.String met, int depth, IAnalyzerBase a)
thrds
- list of threads to be subsetcls
- pattern which must match the class name - simple syntaxmet
- pattern which must match the method name - simple syntaxdepth
- depth below which the stack frame must occura
- the current analyzer
public java.util.Iterator threadsInNativeMethods(java.util.Iterator thrds, int depth, IAnalyzerBase a)
thrds
- list of threads to be subsetdepth
- depth below which the native stack frame must occura
- the current analyzer
public java.util.Iterator threadsWithNativeThreadsIn(java.util.Iterator input, java.lang.String lib, java.lang.String proc, int depth, IAnalyzerBase a)
input
- list of threads to be subsetlib
- library name to match using simple pattern syntax *,?,#proc
- procedure name to match using simple pattern syntax *,?,#depth
- depth below which the stack frame must occura
- the current analyzer
public IAnalysisReport print(java.lang.String title, java.util.Iterator list, int depth, IAnalyzerBase a)
title
- the title for the reportlist
- the Iterator containing the items to be printeddepth
- the depth to be printed where 0 means don't show 'depth' information
and negative means show everythinga
- the current analyzer
public java.lang.String decodeModifiers(int mod)
mod
- the set of modifier flags
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |