BytemanTestHelper
, InterpretedHelper
, JMXHelper
, PeriodicHelper
, ThreadHistoryMonitorHelper
, ThreadMonitorHelper
public class Helper extends Object
Modifier and Type | Method | Description |
---|---|---|
static void |
activated() |
|
boolean |
addCountDown(Object identifier,
int count) |
alias for createCountDown provided for backwards compatibility
|
boolean |
callerCheck(String match,
boolean isRegExp,
boolean includeClass,
boolean includePackage,
int startFrame,
int frameCount) |
test whether the name of any of the selected methods in the stack which called the trigger method
matches the supplied regular expression.
|
boolean |
callerEquals(String name) |
test whether the name of the method which called the the trigger method matches the supplied name
by calling callerEquals(name, false)
|
boolean |
callerEquals(String name,
boolean includeClass) |
test whether the name of method which called the the trigger method matches the supplied name
by calling callerEquals(name, includeClass, false)
|
boolean |
callerEquals(String name,
boolean includeClass,
boolean includePackage) |
test whether the name of method which called the the trigger method matches the supplied name
by calling callerEquals(name, includeClass, includePackage, 1)
|
boolean |
callerEquals(String name,
boolean includeClass,
boolean includePackage,
int frameCount) |
test whether the name of any of the selected methods in the stack which called the trigger method
matches the supplied name by calling
callerCheck(name, false, includeClass, includePackage, 1, frameCount)
|
boolean |
callerEquals(String name,
boolean includeClass,
boolean includePackage,
int startFrame,
int frameCount) |
test whether the name of any of the selected methods in the stack which called the trigger method
matches the supplied name by calling
callerCheck(name, false, includeClass, false, startFrame, frameCount)
|
boolean |
callerEquals(String name,
boolean includeClass,
int frameCount) |
test whether the name of method which called the the trigger method matches the supplied name
by calling callerEquals(name, includeClass, false, frameCount)
|
boolean |
callerEquals(String name,
boolean includeClass,
int startFrame,
int frameCount) |
test whether the name of method which called the the trigger method matches the supplied name
by calling callerEquals(name, includeClass, false, startFrame, frameCount)
|
boolean |
callerEquals(String name,
int frameCount) |
test whether the name of any of the selected methods in the stack which called the trigger method
matches the supplied name by calling callerEquals(name, 1, frameCount)
|
boolean |
callerEquals(String name,
int startFrame,
int frameCount) |
test whether the name of any of the selected methods in the stack which called the trigger method
matches the supplied name by calling callerEquals(name, false, startFrame, frameCount)
|
boolean |
callerMatches(String regExp) |
test whether the name of the method which called the the trigger method matches the supplied regular
by calling callerMatches(regExp, false)
|
boolean |
callerMatches(String regExp,
boolean includeClass) |
test whether the name of method which called the the trigger method matches the supplied regular
expression by calling callerMatches(regExp, includeClass, false)
|
boolean |
callerMatches(String regExp,
boolean includeClass,
boolean includePackage) |
test whether the name of method which called the the trigger method matches the supplied regular
expression by calling callerMatches(regExp, includeClass, includePackage, 1)
|
boolean |
callerMatches(String regExp,
boolean includeClass,
boolean includePackage,
int frameCount) |
test whether the name of method which called the the trigger method matches the supplied regular
expression by calling callerMatches(regExp, includeClass, includePackage, 1, frameCount)
|
boolean |
callerMatches(String regExp,
boolean includeClass,
boolean includePackage,
int startFrame,
int frameCount) |
test whether the name of any of the selected methods in the stack which called the trigger method
matches the supplied regular expression by calling
callerCheck(regExp, true, includeClass, includePackage, 1, frameCount)
|
boolean |
callerMatches(String regExp,
boolean includeClass,
int frameCount) |
test whether the name of method which called the the trigger method matches the supplied regular
expression by calling callerMatches(regExp, includeClass, false, frameCount)
|
boolean |
callerMatches(String regExp,
boolean includeClass,
int startFrame,
int frameCount) |
test whether the name of method which called the the trigger method matches the supplied regular
expression by calling callerMatches(regExp, includeClass, false, startFrame, frameCount)
|
boolean |
callerMatches(String regExp,
int frameCount) |
test whether the name of any of the selected methods in the stack which called the trigger method
matches the supplied regular expression by calling callerMatches(regExp, 1, frameCount)
|
boolean |
callerMatches(String regExp,
int startFrame,
int frameCount) |
test whether the name of any of the selected methods in the stack which called the trigger method
matches the supplied regular expression by calling callerMatches(regExp, false, startFrame, frameCount)
|
boolean |
clear(Object identifier) |
clear the flag keyed by the supplied object if it is not already clear
|
boolean |
clearLinks() |
clear all links in the default linkmap by indirectly calling clearLinks("default")
|
boolean |
clearLinks(Object mapName) |
clear all current links from the map named by mapName
|
boolean |
closeTrace(Object identifier) |
version for backwards compatibility -- docs and original code were mismatched
|
boolean |
countDown(Object identifier) |
builtin to decrement the countdown identified by a specific object, uninstalling it and
returning true only when the count is zero.
|
boolean |
createCountDown(Object identifier,
int count) |
builtin to test create a countdown identified by a specific object and with the specified
count.
|
boolean |
createCounter(Object o) |
create a counter identified by the given object with count 0 as its initial count
|
boolean |
createCounter(Object o,
int value) |
create a counter identified by the given object with the supplied value as its iniital count
|
boolean |
createJoin(Object key,
int max) |
|
boolean |
createLinkMap(Object mapName) |
create a LinkMap used to store links between names and values
|
boolean |
createRendezvous(Object identifier,
int expected) |
call createRendezvous(Object, int, boolean) supplying false for the last parameter
|
boolean |
createRendezvous(Object identifier,
int expected,
boolean restartable) |
create a rendezvous for a given number of threads to join
|
boolean |
createTimer(Object o) |
create a timer identified by the given object
|
static void |
deactivated() |
|
boolean |
debug(String text) |
builtin to print a message during rule execution.
|
int |
decrementCounter(Object o) |
decrement the value of the counter associated with given identifier, creating a new one with count zero
if none exists
|
void |
delay(long millisecs) |
delay execution of the current thread for a specified number of
milliseconds
|
boolean |
deleteCounter(Object o) |
delete a counter identified by the given object with count 0 as its initial count
|
boolean |
deleteLinkMap(Object mapName) |
delete a LinkMap used to store links between names and values
|
boolean |
deleteRendezvous(Object identifier,
int expected) |
delete a rendezvous.
|
boolean |
deleteTimer(Object o) |
delete a timer identified by the given object
|
static boolean |
err(String msg) |
punts to static call dotraceln("err", msg) to print msg to the "err"
trace stream
|
static void |
errTraceException(Throwable th) |
Print the stack trace for th to the "err" trace stream
|
boolean |
flag(Object identifier) |
set a flag keyed by the supplied object if it is not already set
|
boolean |
flagged(Object identifier) |
test the state of the flag keyed by the supplied object
|
String |
formatAllStacks() |
return all stack traces by calling formatAllStacks(null)
|
String |
formatAllStacks(int maxFrames) |
return all stack traces by calling formatAllStacks(null, maxFrames)
|
String |
formatAllStacks(String prefix) |
return all stack traces by calling formatAllStacks(prefix, 0)
|
String |
formatAllStacks(String prefix,
int maxFrames) |
return all stack traces
|
String |
formatStack() |
return a stack trace by calling formatStack(null)
|
String |
formatStack(int maxFrames) |
return a stack trace by calling formatStack(null, maxFrames)
|
String |
formatStack(String prefix) |
return a stack trace by calling formatStack(prefix, 0)
|
String |
formatStack(String prefix,
int maxFrames) |
print a stack trace to the trace stream identified by key
|
String |
formatStackBetween(String from,
String to) |
return a String tracing the stack between the frames which match start and end by calling
formatStackBetween(from, to, null)
|
String |
formatStackBetween(String from,
String to,
boolean includeClass) |
return a String tracing the stack between the frames which match start and end by calling
formatStackBetween(from, to, includeClass, false)
|
String |
formatStackBetween(String from,
String to,
boolean includeClass,
boolean includePackage) |
return a String tracing the stack between the frames which match start and end by calling
formatStackBetween(from, to, includeClass, includePackage, null)
|
String |
formatStackBetween(String from,
String to,
boolean includeClass,
boolean includePackage,
String prefix) |
return a String tracing the stack between the frames which match start and end by calling
formatStackRange(from, to, false, includeClass, includePackage, prefix)
|
String |
formatStackBetween(String from,
String to,
boolean includeClass,
String prefix) |
return a String tracing the stack between the frames which match start and end by calling
formatStackBetween(from, to, includeClass, false, prefix)
|
String |
formatStackBetween(String from,
String to,
String prefix) |
return a String tracing the stack between the frames which match start and end
by calling formatStackBetween(from, to, false, false, false, prefix)
|
String |
formatStackBetweenMatches(String from,
String to) |
return a String tracing the stack between the frames which match start and end by calling
formatStackBetweenMatches(from, to, null)
|
String |
formatStackBetweenMatches(String from,
String to,
boolean includeClass) |
return a String tracing the stack between the frames which match start and end by calling
formatStackBetweenMatches(from, to, includeClass, false)
|
String |
formatStackBetweenMatches(String from,
String to,
boolean includeClass,
boolean includePackage) |
return a String tracing the stack between the frames which match start and end by calling
formatStackBetweenMatches(from, to, includeClass, includePackage, null)
|
String |
formatStackBetweenMatches(String from,
String to,
boolean includeClass,
boolean includePackage,
String prefix) |
return a String tracing the stack between the frames which match start and end by calling
formatStackRange(from, to, true, includeClass, includePackage, prefix)
|
String |
formatStackBetweenMatches(String from,
String to,
boolean includeClass,
String prefix) |
return a String tracing the stack between the frames which match start and end by calling
formatStackBetweenMatches(from, to, includeClass, false, prefix)
|
String |
formatStackBetweenMatches(String from,
String to,
String prefix) |
return a String tracing the stack between the frames which match start and end
by calling formatStackBetweenMatches(from, to, false, false, false, prefix)
|
String |
formatStackMatching(String regExp) |
return a String tracing all stack frames which match pattern by calling formatStackMatching(pattern, null)
|
String |
formatStackMatching(String regExp,
boolean includeClass) |
return a String tracing all stack frames which match pattern by calling
formatStackMatching(pattern, includeClass, false)
|
String |
formatStackMatching(String regExp,
boolean includeClass,
boolean includePackage) |
return a String tracing all stack frames which match pattern by calling
formatStackMatching(pattern, includeClass, includePackage, null)
|
String |
formatStackMatching(String regExp,
boolean includeClass,
boolean includePackage,
String prefix) |
return a String tracing all stack frames which match pattern.
|
String |
formatStackMatching(String regExp,
boolean includeClass,
String prefix) |
return a String tracing all stack frames which match pattern by calling
formatStackMatching(pattern, includeClass, false, prefix)
|
String |
formatStackMatching(String regExp,
String prefix) |
return a String tracing all stack frames which match pattern by calling
formatStackMatching(pattern, false, prefix)
|
String |
formatStackRange(String from,
String to,
boolean isRegExp,
boolean includeClass,
boolean includePackage,
String prefix) |
return a String tracing the stack between the frames which match start and end.
|
String |
formatThreadStack(String threadName) |
return stack traces of a specific thread by calling formatThreadStack(threadName, null)
|
String |
formatThreadStack(String threadName,
int maxFrames) |
return all stack traces by calling formatThreadStack(threadName, null, maxFrames)
|
String |
formatThreadStack(String threadName,
String prefix) |
return all stack traces by calling formatThreadStack(threadName, prefix, 0)
|
String |
formatThreadStack(String threadName,
String prefix,
int maxFrames) |
return all stack traces
|
boolean |
getCountDown(Object identifier) |
for backwards compatibility
|
long |
getElapsedTimeFromTimer(Object o) |
get the elapsed time from the start (or last reset) of timer associated with given identifier,
creating a new one if none exists
|
long |
getObjectSize(Object o) |
provide an estimate of an object's size
return -1 if not running in a real agent
|
int |
getRendezvous(Object identifier,
int expected) |
test whether a rendezvous with a specific expected count is
associated with identifier
|
protected StackTraceElement[] |
getStack() |
access to the current stack frames
|
int |
incrementCounter(Object o) |
increment the value of the counter associated with given identifier, creating a new one with count zero
if none exists
|
int |
incrementCounter(Object o,
int amount) |
increment the value of the counter associated with given identifier by the given amount, creating a new one
with count zero if none exists
|
static void |
installed(Rule rule) |
|
boolean |
isCountDown(Object identifier) |
builtin to test test if a countdown has been installed
|
boolean |
isJoin(Object key,
int max) |
|
boolean |
isRendezvous(Object identifier,
int expected) |
test whether a rendezvous with a specific expected count is associated with identifier
|
boolean |
joinEnlist(Object key) |
|
boolean |
joinWait(Object key,
int count) |
|
boolean |
joinWait(Object key,
int count,
long millis) |
|
void |
killJVM() |
cause the current JVM to halt immediately, simulating a crash as near as possible.
|
void |
killJVM(int exitCode) |
cause the current JVM to halt immediately, simulating a crash
as near as possible.
|
void |
killThread() |
cause the current thread to throw a runtime exception which will normally cause it to exit.
|
Object |
link(Object name,
Object value) |
add a link to the default LinkMap by calling link("default", name, value)
|
Object |
link(Object mapName,
Object name,
Object value) |
atomically add a link from name to value to the LinkMap
identified by mapName returning any previously linked
Object or null if no link currently exists in the map
|
Object |
linked(Object name) |
retrieve a link from the default LinkMap by calling linked("default", name)
|
Object |
linked(Object mapName,
Object name) |
retrieve the Object name currently is linked to from
the LinkMap named by mapName or null if no link currently
exists in the map
|
List<Object> |
linkNames() |
retrieve all keys in the default linkmap by indirectly calling linkNames("default")
|
List<Object> |
linkNames(Object mapName) |
atomically return a list of all keys for current links in the map named by mapName
|
List<Object> |
linkValues() |
retrieve all values in the default linkmap by indirectly calling linkValues("default")
|
List<Object> |
linkValues(Object mapName) |
atomically return a list of all values for current links in the map named by mapName
|
protected int |
matchIndex(StackTraceElement[] stack,
String pattern,
boolean isRegExp,
boolean includeClass,
boolean includePackage,
int start,
int limit) |
return the index of the first frame at or below index start
which matches pattern
|
static boolean |
noisy(String msg) |
punts to static call dotraceln("nzy", msg) to print msg to the "nzy"
trace stream when the noisy log level is enabled
|
static void |
noisyTraceException(Throwable th) |
Print the stack trace to System.out when the noisy log level is enabled
|
boolean |
openTrace(Object identifier) |
version for backwards compatibility -- docs and original code were mismatched
|
boolean |
openTrace(Object identifier,
String fileName) |
version for backwards compatibility -- docs and original code were mismatched
|
static boolean |
out(String msg) |
punts to static call dotraceln("out", msg) to print msg to the "out"
trace stream
|
static void |
outTraceException(Throwable th) |
Print the stack trace for th to the "out" trace stream
|
protected void |
printFrame(StringBuffer buffer,
StackTraceElement frame) |
print the details of stack frame to buffer
|
protected void |
printlnFrame(StringBuffer buffer,
StackTraceElement frame) |
print the details of stack frame followed by a newline to
buffer by calling printlnFrame(buffer, frame) then
buffer.append('\n')
|
int |
readCounter(Object o) |
read the value of the counter associated with given identifier, creating a new one with count zero
if none exists
|
int |
readCounter(Object o,
boolean zero) |
read and optionally reset to zero the value of the counter associated with given identifier, creating
a new one with count zero if none exists
|
int |
rendezvous(Object identifier) |
meet other threads at a given rendezvous returning only when
the expected number have arrived
|
int |
rendezvous(Object identifier,
long millis) |
meet other threads at a given rendezvous returning either when
the expected number have arrived or if a timeout is exceeded
|
long |
resetTimer(Object o) |
reset the timer associated with given identifier, creating a new one
if none exists
|
boolean |
setTriggering(boolean enabled) |
enable or disable recursive triggering of rules by subsequent operations performed during binding,
testing or firing of the current rule in the current thread.
|
boolean |
signalKill(Object identifier) |
for backwards compatibility
|
boolean |
signalKill(Object identifier,
boolean mustMeet) |
for backwards compatibility
|
boolean |
signalThrow(Object identifier) |
call signalThrow(Object, boolean) defaulting the second argument to
false
|
boolean |
signalThrow(Object identifier,
boolean mustMeet) |
signal an event identified by the suppied object, causing all
waiting threads to throw an exception and clearing the
event.
|
boolean |
signalWake(Object identifier) |
call signalWake(Object, boolean) defaulting the second argument to
false
|
boolean |
signalWake(Object identifier,
boolean mustMeet) |
signal an event identified by the supplied object, causing all
waiting threads to resume rule processing and clearing the
event.
|
String |
toString() |
return a unique name for the trigger point associated with this
rule.
|
boolean |
trace(Object identifier,
String message) |
punts to static call Helper.dotrace(identifier, message).
|
boolean |
trace(String message) |
equivalent to calling trace("out", message).
|
void |
traceAllStacks() |
print trace of all threads' stacks to System.out by calling traceAllStacks(null)
|
void |
traceAllStacks(int maxFrames) |
print trace of all threads' stacks to System.out by calling traceAllStacks(null, maxFrames)
|
void |
traceAllStacks(String prefix) |
print trace of all threads' stacks to System.out by calling traceAllStacks(prefix, "out")
|
void |
traceAllStacks(String prefix,
int maxFrames) |
print trace of all threads' stacks to System.out by calling traceAllStacks(prefix, "out", maxFrames)
|
void |
traceAllStacks(String prefix,
Object key) |
print trace of all threads' stacks to the trace stream identified by key by calling traceAllStacks(prefix, key, 0)
|
void |
traceAllStacks(String prefix,
Object key,
int maxFrames) |
print trace of all threads' stacks to the trace stream identified by key
|
boolean |
traceClose(Object identifier) |
builtin to close the trace output stream identified by identifier flushing any pending
output.
|
boolean |
traceln(Object identifier,
String message) |
punts to static call dotraceln(identifier, message).
|
boolean |
traceln(String message) |
equivalent to calling traceln("out", message).
|
boolean |
traceOpen(Object identifier) |
builtin to open a trace output stream identified by identifier to a file located in the
current working directory using a unique generated name.
|
boolean |
traceOpen(Object identifier,
String fileName) |
builtin to open a trace output stream which is redirected to a file in the current directory
if specified.
|
void |
traceStack() |
print a stack trace to System.out by calling traceStack(null)
|
void |
traceStack(int maxFrames) |
print a stack trace to System.out by calling traceStack(null, maxFrames)
|
void |
traceStack(String prefix) |
print a stack trace to System.out by calling traceStack(prefix, "out")
|
void |
traceStack(String prefix,
int maxFrames) |
print a stack trace to System.out by calling traceStack(prefix, "out", maxFrames)
|
void |
traceStack(String prefix,
Object key) |
print a stack trace to the trace stream identified by key by calling traceStack(prefix, key, 0)
|
void |
traceStack(String prefix,
Object key,
int maxFrames) |
print a stack trace to the trace stream identified by key
|
void |
traceStackBetween(String from,
String to) |
print all stack frames between the frames which match start and end to System.out by calling
traceStackBetween(from, to, null)
|
void |
traceStackBetween(String from,
String to,
boolean includeClass) |
print all stack frames between the frames which match start and end to System.out by calling
traceStackBetween(from, to, includeClass, false)
|
void |
traceStackBetween(String from,
String to,
boolean includeClass,
boolean includePackage) |
print all stack frames between the frames which match start and end to System.out by calling
traceStackBetween(from, to, includeClass, includePackage, null)
|
void |
traceStackBetween(String from,
String to,
boolean includeClass,
boolean includePackage,
String prefix) |
print all stack frames between the frames which match start and end to System.out preceded by prefix
by calling traceStackBetween(from, to, includeClass, includePackage, prefix, "out")
should be printed.
|
void |
traceStackBetween(String from,
String to,
boolean includeClass,
boolean includePackage,
String prefix,
Object key) |
print all stack frames between the frames which match start and end preceded by prefix
by calling traceStackBetween(from, to, false, includeClass, includePackage, prefix, key)
|
void |
traceStackBetween(String from,
String to,
boolean includeClass,
String prefix) |
print all stack frames between the frames which match start and end to System.out by calling
traceStackBetween(from, to, includeClass, false, prefix)
|
void |
traceStackBetween(String from,
String to,
boolean includeClass,
String prefix,
Object key) |
print all stack frames between the frames which match start and end preceded by prefix
by calling traceStackBetween(from, to, includeClass, false, prefix, key)
|
void |
traceStackBetween(String from,
String to,
String prefix) |
print all stack frames between the frames which match start and end to System.out preceded by prefix
by calling traceStackBetween(from, to, prefix, "out")
|
void |
traceStackBetween(String from,
String to,
String prefix,
Object key) |
print all stack frames between the frames which match start and end preceded by prefix
by calling traceStackBetween(from, to, false, prefix, key)
|
void |
traceStackBetweenMatches(String from,
String to) |
print all stack frames between the frames which match start and end to System.out by calling
traceStackBetweenMatches(from, to, null)
|
void |
traceStackBetweenMatches(String from,
String to,
boolean includeClass) |
print all stack frames between the frames which match start and end to System.out by calling
traceStackBetweenMatches(from, to, includeClass, false)
|
void |
traceStackBetweenMatches(String from,
String to,
boolean includeClass,
boolean includePackage) |
print all stack frames between the frames which match start and end to System.out by calling
traceStackBetweenMatches(from, to, includeClass, includePackage, null)
|
void |
traceStackBetweenMatches(String from,
String to,
boolean includeClass,
boolean includePackage,
String prefix) |
print all stack frames between the frames which match start and end to System.out preceded by prefix
by calling traceStackBetweenMatches(from, to, true, includeClass, includePackage, prefix, "out");
|
void |
traceStackBetweenMatches(String from,
String to,
boolean includeClass,
boolean includePackage,
String prefix,
Object key) |
print all stack frames between the frames which match start and end preceded by prefix
by calling traceStackRange(from, to, true, includeClass, includePackage, prefix, key)
|
void |
traceStackBetweenMatches(String from,
String to,
boolean includeClass,
String prefix) |
print all stack frames between the frames which match start and end to System.out by calling
traceStackBetweenMatches(from, to, includeClass, false, prefix)
|
void |
traceStackBetweenMatches(String from,
String to,
boolean includeClass,
String prefix,
Object key) |
print all stack frames between the frames which match start and end preceded by prefix
by calling traceStackBetween(from, to, includeClass, false, prefix, key)
|
void |
traceStackBetweenMatches(String from,
String to,
String prefix) |
print all stack frames between the frames which match start and end to System.out preceded by prefix
by calling traceStackBetweenMatches(from, to, prefix, "out")
|
void |
traceStackBetweenMatches(String from,
String to,
String prefix,
Object key) |
print all stack frames between the frames which match start and end to System.out preceded by prefix
by calling traceStackBetweenMatches(from, to, false, prefix, key)
|
void |
traceStackMatching(String regExp) |
print all stack frames which match pattern to System.out by calling traceStackMatching(pattern, null)
|
void |
traceStackMatching(String regExp,
boolean includeClass) |
print all stack frames which match pattern to System.out by calling
traceStackMatching(pattern, includeClass, false)
|
void |
traceStackMatching(String regExp,
boolean includeClass,
boolean includePackage) |
print all stack frames which match pattern to System.out by calling
traceStackMatching(pattern, includeClass, includePackage, null)
|
void |
traceStackMatching(String regExp,
boolean includeClass,
boolean includePackage,
String prefix) |
print all stack frames which match pattern to System.out preceded by prefix by calling
traceStackMatching(pattern, includeClass, , includePackage, prefix, "out")
|
void |
traceStackMatching(String regExp,
boolean includeClass,
boolean includePackage,
String prefix,
Object key) |
print all stack frames which match pattern to the trace stream identified by key preceded by prefix.
|
void |
traceStackMatching(String regExp,
boolean includeClass,
String prefix) |
print all stack frames which match pattern to System.out preceded by prefix by calling
traceStackMatching(pattern, includeClass, false, prefix)
|
void |
traceStackMatching(String regExp,
boolean includeClass,
String prefix,
Object key) |
print all stack frames which match pattern to System.out preceded by prefix by calling
traceStackMatching(pattern, includeClass, false, prefix, key)
|
void |
traceStackMatching(String regExp,
String prefix) |
print all stack frames which match pattern to System.out preceded by prefix by calling
traceStackMatching(pattern, prefix, "out")
|
void |
traceStackMatching(String regExp,
String prefix,
Object key) |
print all stack frames which match pattern to System.out preceded by prefix by calling
|
void |
traceStackRange(String from,
String to,
boolean isRegExp,
boolean includeClass,
boolean includePackage,
String prefix,
Object key) |
print all stack frames between the frames which match start and end to the trace stream identified by key
preceded by prefix.
|
void |
traceThreadStack(String threadName) |
print a stack trace of a specific thread to System.out by calling traceThreadStack(threadName, null)
|
void |
traceThreadStack(String threadName,
int maxFrames) |
print a stack trace of a specific thread to System.out by calling traceThreadStack(threadName, null, maxFrames)
|
void |
traceThreadStack(String threadName,
String prefix) |
print a stack trace of a specific thread to System.out by calling traceThreadStack(threadName, prefix, "out")
|
void |
traceThreadStack(String threadName,
String prefix,
int maxFrames) |
print a stack trace of a specific thread of a specific thread to System.out by calling traceThreadStack(threadName, prefix, "out", maxFrames)
|
void |
traceThreadStack(String threadName,
String prefix,
Object key) |
print a stack trace of a specific thread to the trace stream identified by key by calling traceThreadStack(threadName, prefix, key, 0)
|
void |
traceThreadStack(String threadName,
String prefix,
Object key,
int maxFrames) |
print a stack trace to the trace stream identified by key
|
protected int |
triggerIndex(StackTraceElement[] stack) |
return the index of the frame in stack for the trigger method
below which the rule system was entered or -1 if it cannot be
found
|
static void |
uninstalled(Rule rule) |
|
Object |
unlink(Object name) |
delete a link from the default LinkMap by calling unlink("default", name)
|
Object |
unlink(Object mapName,
Object name) |
atomically remove any link from name returning the
Object it is currently linked to or null if no link
currently exists in the map
|
static boolean |
verbose(String msg) |
punts to static call dotraceln("vrb", msg) to print msg to the "vrb"
trace stream when the verbose log level is enabled
|
static void |
verboseTraceException(Throwable th) |
Print the stack trace for th to System.out when the verbose log level is enabled
|
void |
waitFor(Object identifier) |
wait for another thread to signal an event with no timeout.
|
void |
waitFor(Object identifier,
long millisecs) |
wait for another thread to signal an event with a specific
timeout or no timeout if zero is supplied as the second
argument.
|
boolean |
waiting(Object identifier) |
test if there are threads waiting for an event identified by the supplied object to
be signalled
|
protected Rule rule
protected Helper(Rule rule)
public boolean debug(String text)
text
- the message to be printed as trace outputpublic boolean traceOpen(Object identifier)
identifier
- an identifier used subsequently to identify the trace output streampublic boolean traceOpen(Object identifier, String fileName)
identifier
- an identifier used subsequently to identify the trace output streamfileName
- the name of the trace file or null if a name should be generatedpublic boolean traceClose(Object identifier)
identifier
- an identifier used subsequently to identify the trace output streampublic boolean trace(String message)
message
- the message to be printed in the output streampublic boolean trace(Object identifier, String message)
identifier
- an identifier used subsequently to identify the trace output streammessage
- the message to be printedpublic boolean traceln(String message)
message
- the message to be tracedpublic boolean traceln(Object identifier, String message)
identifier
- an identifier used subsequently to identify the trace output streammessage
- the message to be tracedpublic boolean openTrace(Object identifier)
identifier
- an identifier used subsequently to identify the trace output streampublic boolean openTrace(Object identifier, String fileName)
identifier
- an identifier used subsequently to identify the trace output streamfileName
- the name of the trace file or null if a name should be generatedpublic boolean closeTrace(Object identifier)
identifier
- an identifier used subsequently to identify the trace output streampublic static boolean out(String msg)
msg
- the message to be tracedpublic static boolean err(String msg)
msg
- the message to be tracedpublic static boolean verbose(String msg)
msg
- the message to be tracedpublic static boolean noisy(String msg)
msg
- the message to be tracedpublic static void outTraceException(Throwable th)
th
- the throwable stack tracepublic static void errTraceException(Throwable th)
th
- the throwable stack tracepublic static void verboseTraceException(Throwable th)
th
- the throwable stack tracepublic static void noisyTraceException(Throwable th)
th
- the throwable stack tracepublic boolean flag(Object identifier)
identifier
- the object identifying the relevant flagpublic boolean flagged(Object identifier)
identifier
- the object identifying the relevant flagpublic boolean clear(Object identifier)
identifier
- the object identifying the relevant flagpublic boolean getCountDown(Object identifier)
identifier
- an object which uniquely identifies the countdown in questionpublic boolean isCountDown(Object identifier)
identifier
- an object which uniquely identifies the countdown in questionpublic boolean addCountDown(Object identifier, int count)
identifier
- an object which uniquely identifies the countdown in questioncount
- the number of times the countdown needs to be counted down before the
countdown operation returns true. e.g. if count is supplied as 2 then the first two
calls to countDown(Object)
will return false and the third call will return true.public boolean createCountDown(Object identifier, int count)
identifier
- an object which uniquely identifies the countdown in questioncount
- the number of times the countdown needs to be counted down before the
countdown operation returns true. e.g. if count is supplied as 2 then the first two
calls to countDown(Object)
will return false and the third call will return true.public boolean countDown(Object identifier)
identifier
- an object which uniquely identifies the countdown in questionpublic boolean waiting(Object identifier)
identifier
- an object identifying the event to be signalledpublic void waitFor(Object identifier)
waitFor(Object, long)
for details and caveats regarding calling this builtin.identifier
- an object used to identify the signal that is to be waited on.public void waitFor(Object identifier, long millisecs)
identifier
- an object used to identify the signal that is
to be waited on. n.b. the wait operation is not performed using
synchronization on the supplied object as the rule system
cannot safely release and reobtain locks on application
data. this argument is used as a key to identify a
synchronization object private to the rule system.millisecs
- hwo long to waitpublic boolean signalWake(Object identifier)
identifier
- an object used to identify the signal that is
to be waited on. n.b. the wait operation is not performed using
synchronization on the supplied object as the rule system
cannot safely release and reobtain locks on application
data. this argument is usedpublic boolean signalWake(Object identifier, boolean mustMeet)
waitFor(java.lang.Object)
or because some other thread
has sent the signal then this call returns false, otherwise it
returns true. This operation is atomic, allowing the builtin to
be used in rule conditions.identifier
- an object used to identify the which waiting
threads the signal should be delivered to. n.b. the operation
is not performed using a notify on the supplied object. this
argument is used as a key to identify a synchronization object
private to the rule system.mustMeet
- if true then the signal operation must not be
delivered until some other thread is actually waiting on a
waiter identified by identifier. if there is no such waiter
when this method is called then the calling thread will suspend
until one arrives.public boolean signalKill(Object identifier)
identifier
- an object used to identify the which waiting
threads the signal should be delivered to. n.b. the operation
is not performed using a notify on the supplied object. this
argument is used as a key to identify a synchronization object
private to the rule system.public boolean signalKill(Object identifier, boolean mustMeet)
identifier
- an object used to identify the which waiting
threads the signal should be delivered to. n.b. the operation
is not performed using a notify on the supplied object. this
argument is used as a key to identify a synchronization object
private to the rule system.mustMeet
- if true then the signal operation must not be
delivered until some other thread is actually waiting on a
waiter identified by identifier. if there is no such waiter
when this method is called then the calling thread will suspend
until one arrives.public boolean signalThrow(Object identifier)
identifier
- an object used to identify the which waiting
threads the signal should be delivered to. n.b. the operation
is not performed using a notify on the supplied object. this
argument is used as a key to identify a synchronization object
private to the rule system.public boolean signalThrow(Object identifier, boolean mustMeet)
waitFor(java.lang.Object)
or because some other
thread has already sent the signal, then this call returns
false, otherwise it returns true. This operation is atomic,
allowing the builtin to be used safely in rule conditions.identifier
- an object used to identify the which waiting
threads the signal should be delivered to. n.b. the operation
is not performed using a notify on the supplied object. this
argument is used as a key to identify a synchronization object
private to the rule system.mustMeet
- if true then the signal operation must not be
delivered until some other thread is actually waiting on a
waiter identified by identifier. if there is no such waiter
when this method is called then the calling thread will suspend
until one arrives.public void delay(long millisecs)
millisecs
- how many milliseconds to delay forpublic boolean createRendezvous(Object identifier, int expected)
identifier
- an identifier for the rendezvousexpected
- the number of threads expected to meet at the rendezvouspublic boolean createRendezvous(Object identifier, int expected, boolean restartable)
identifier
- an identifier for the rendezvious in
subsequent rendezvous operationsexpected
- the number of threads expected to meet at the
rendezvousrestartable
- true if the rendezvous is can be repeatedly
entered false if it is deleted after the first time all
expected threads arrivepublic boolean isRendezvous(Object identifier, int expected)
identifier
- the identifier for the rendezvousexpected
- the number of threads expected to meet at the rendezvouspublic int getRendezvous(Object identifier, int expected)
identifier
- the identifier for the rendezvousexpected
- the number of threads expected to meet at the rendezvouspublic int rendezvous(Object identifier)
identifier
- the identifier for the rendezvouspublic int rendezvous(Object identifier, long millis)
identifier
- the identifier for the rendezvousmillis
- the timeout after which the caller may returnpublic boolean deleteRendezvous(Object identifier, int expected)
identifier
- the identifier for the rendezvousexpected
- the number of threads expected to meet at the
rendezvouspublic boolean createJoin(Object key, int max)
public boolean isJoin(Object key, int max)
public boolean joinEnlist(Object key)
public boolean joinWait(Object key, int count)
public boolean joinWait(Object key, int count, long millis)
public boolean createCounter(Object o)
o
- an identifier used to refer to the counter in futurepublic boolean createCounter(Object o, int value)
o
- an identifier used to refer to the counter in futurevalue
- the initial value for the counterpublic boolean deleteCounter(Object o)
o
- the identifier for the coounterpublic int readCounter(Object o)
o
- the identifier for the counterpublic int readCounter(Object o, boolean zero)
o
- the identifier for the counterzero
- if true then zero the counterpublic int incrementCounter(Object o)
o
- the identifier for the counterpublic int decrementCounter(Object o)
o
- the identifier for the counterpublic int incrementCounter(Object o, int amount)
o
- the identifier for the counteramount
- the amount to add to the counterpublic boolean createTimer(Object o)
o
- an identifier used to refer to the timer in futurepublic boolean deleteTimer(Object o)
o
- the identifier for the timerpublic long getElapsedTimeFromTimer(Object o)
o
- the identifier for the timerpublic long resetTimer(Object o)
o
- the identifier for the timerpublic boolean createLinkMap(Object mapName)
mapName
- the identifier for the mappublic boolean deleteLinkMap(Object mapName)
mapName
- the identifier for the mappublic Object link(Object mapName, Object name, Object value)
mapName
- the identifier for the mapname
- the name of the keyvalue
- the value to be stored in the mappublic Object linked(Object mapName, Object name)
mapName
- the identifier for the mapname
- the name of the keypublic Object unlink(Object mapName, Object name)
mapName
- the identifier for the mapname
- the name of the keypublic List<Object> linkNames(Object mapName)
mapName
- the name of the map to retrieve keys frompublic List<Object> linkValues(Object mapName)
mapName
- the name of the map to retrieve values frompublic boolean clearLinks(Object mapName)
mapName
- the name of the map to clearpublic Object link(Object name, Object value)
name
- the name of the keyvalue
- the value to be stored under keypublic Object linked(Object name)
name
- the name of the keypublic Object unlink(Object name)
name
- the name of the keypublic List<Object> linkNames()
public List<Object> linkValues()
public boolean clearLinks()
public void killThread()
public void killJVM()
public void killJVM(int exitCode)
exitCode
- the code to be passed to the runtime halt callpublic boolean callerEquals(String name)
name
- the name to matchpublic boolean callerEquals(String name, int frameCount)
name
- the name to matchframeCount
- the number of frames to checkpublic boolean callerEquals(String name, int startFrame, int frameCount)
name
- the name to matchstartFrame
- the frame index to start checking from with 0
identifing the trigger method frameframeCount
- the number of frames to checkpublic boolean callerEquals(String name, boolean includeClass)
name
- the name to matchincludeClass
- true if the check shoudl include class name false if notpublic boolean callerEquals(String name, boolean includeClass, int frameCount)
name
- the name to matchincludeClass
- true if the check should include the class
name false if notframeCount
- the number of frames to checkpublic boolean callerEquals(String name, boolean includeClass, int startFrame, int frameCount)
name
- the name to matchincludeClass
- true if the check should include the
class name false if notstartFrame
- the frame index to start checking from with 0
identifing the trigger method frameframeCount
- the number of frames to checkpublic boolean callerEquals(String name, boolean includeClass, boolean includePackage)
name
- the name to matchincludeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notpublic boolean callerEquals(String name, boolean includeClass, boolean includePackage, int frameCount)
name
- the name to matchincludeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notframeCount
- the number of frames to checkpublic boolean callerEquals(String name, boolean includeClass, boolean includePackage, int startFrame, int frameCount)
name
- the name to matchincludeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notstartFrame
- the frame index to start checking from with 0
identifing the trigger method frameframeCount
- the number of frames to checkpublic boolean callerMatches(String regExp)
regExp
- the pattern to matchpublic boolean callerMatches(String regExp, int frameCount)
regExp
- the pattern to matchframeCount
- the number of frames to checkpublic boolean callerMatches(String regExp, int startFrame, int frameCount)
regExp
- the pattern to matchstartFrame
- the frame index to start checking from with 0
identifing the trigger method frameframeCount
- the number of frames to checkpublic boolean callerMatches(String regExp, boolean includeClass)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notpublic boolean callerMatches(String regExp, boolean includeClass, int frameCount)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notframeCount
- the number of frames to checkpublic boolean callerMatches(String regExp, boolean includeClass, int startFrame, int frameCount)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notstartFrame
- the frame index to start checking from with 0
identifing the trigger method frameframeCount
- the number of frames to checkpublic boolean callerMatches(String regExp, boolean includeClass, boolean includePackage)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notpublic boolean callerMatches(String regExp, boolean includeClass, boolean includePackage, int frameCount)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notframeCount
- the number of frames to checkpublic boolean callerMatches(String regExp, boolean includeClass, boolean includePackage, int startFrame, int frameCount)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notstartFrame
- the frame index to start checking from with 0
identifing the trigger method frameframeCount
- the number of frames to checkpublic boolean callerCheck(String match, boolean isRegExp, boolean includeClass, boolean includePackage, int startFrame, int frameCount)
match
- an expression which will be matched against the name of the method which called
the trigger methodisRegExp
- true if match should be matched as a regular expression and false if it should be matched
using a String equals comparison.includeClass
- true if the match should be against the class qualified method nameincludePackage
- true if the match should be against the package and class qualified method name.
ignored if includeClass is not also true.startFrame
- identifies the first frame which frame which should be considered. 0 identifies
the trigger frame, 1 the frame for the caller of the trigger method etc. If startFrame is negative
false is returned.frameCount
- counts the frames which should be checked starting from the first caller. if
this is non-positive or exceeds the actual number of callers above the start frame then all frames in
the stack are tested.public void traceStack()
public void traceStack(String prefix)
prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic void traceStack(String prefix, Object key)
prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generatedpublic void traceStack(int maxFrames)
maxFrames
- the maximum number of frames to print or 0 if
no limit should applypublic void traceStack(String prefix, int maxFrames)
prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedmaxFrames
- the maximum number of frames to print or 0 if
no limit should applypublic void traceStack(String prefix, Object key, int maxFrames)
prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generatedmaxFrames
- the maximum number of frames to print or 0 if
no limit should applypublic void traceAllStacks()
public void traceAllStacks(String prefix)
prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic void traceAllStacks(String prefix, Object key)
prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generatedpublic void traceAllStacks(int maxFrames)
maxFrames
- the maximum number of frames to print or 0 if
no limit should applypublic void traceAllStacks(String prefix, int maxFrames)
prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedmaxFrames
- the maximum number of frames to print or 0 if
no limit should applypublic void traceAllStacks(String prefix, Object key, int maxFrames)
prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generatedmaxFrames
- the maximum number of frames to print or 0 if
no limit should applypublic void traceThreadStack(String threadName)
threadName
- a string identifying the threadpublic void traceThreadStack(String threadName, String prefix)
threadName
- a string identifying the threadprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + threadName + "\n" is usedpublic void traceThreadStack(String threadName, String prefix, Object key)
threadName
- a string identifying the threadprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + threadName + "\n" is usedkey
- an object identifying the trace stream to which
output should be generatedpublic void traceThreadStack(String threadName, int maxFrames)
threadName
- a string identifying the threadmaxFrames
- the maximum number of frames to print or 0 if
no limit should applypublic void traceThreadStack(String threadName, String prefix, int maxFrames)
threadName
- a string identifying the threadprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + threadName + "\n" is usedmaxFrames
- the maximum number of frames to print or 0 if
no limit should applypublic void traceThreadStack(String threadName, String prefix, Object key, int maxFrames)
threadName
- a string identifying the threadprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + threadName + "\n" is usedkey
- an object identifying the trace stream to which
output should be generatedmaxFrames
- the maximum number of frames to print or 0 if
no limit should applypublic void traceStackMatching(String regExp)
regExp
- the pattern to matchpublic void traceStackMatching(String regExp, String prefix)
regExp
- the pattern to matchprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic void traceStackMatching(String regExp, String prefix, Object key)
regExp
- the pattern to matchprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generated
traceStackMatching(pattern, false, prefix, key)public void traceStackMatching(String regExp, boolean includeClass)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notpublic void traceStackMatching(String regExp, boolean includeClass, String prefix)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic void traceStackMatching(String regExp, boolean includeClass, String prefix, Object key)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generatedpublic void traceStackMatching(String regExp, boolean includeClass, boolean includePackage)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notpublic void traceStackMatching(String regExp, boolean includeClass, boolean includePackage, String prefix)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic void traceStackMatching(String regExp, boolean includeClass, boolean includePackage, String prefix, Object key)
regExp
- a pattern which will be matched against the method name of the stack frame as a
regular expression by calling String.matches()includeClass
- true if the match should be against the package and class qualified method nameincludePackage
- true if the match should be against the package and class qualified method name.
ignored if includeClass is not also true.prefix
- a String to be printed once before printing each line of stack trace. if supplied as null
then the prefix "Stack trace for thread " + Thread.currentThread().getName() + " matching " + pattern + "\n" is usedkey
- an object identifying the trace stream to which output should be generatedpublic void traceStackBetween(String from, String to)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.public void traceStackBetween(String from, String to, String prefix)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic void traceStackBetween(String from, String to, String prefix, Object key)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generatedpublic void traceStackBetween(String from, String to, boolean includeClass)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notpublic void traceStackBetween(String from, String to, boolean includeClass, String prefix)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic void traceStackBetween(String from, String to, boolean includeClass, String prefix, Object key)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generatedpublic void traceStackBetween(String from, String to, boolean includeClass, boolean includePackage)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notpublic void traceStackBetween(String from, String to, boolean includeClass, boolean includePackage, String prefix)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic void traceStackBetween(String from, String to, boolean includeClass, boolean includePackage, String prefix, Object key)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generatedpublic void traceStackBetweenMatches(String from, String to)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.public void traceStackBetweenMatches(String from, String to, String prefix)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" ispublic void traceStackBetweenMatches(String from, String to, String prefix, Object key)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generatedpublic void traceStackBetweenMatches(String from, String to, boolean includeClass)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notpublic void traceStackBetweenMatches(String from, String to, boolean includeClass, String prefix)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic void traceStackBetweenMatches(String from, String to, boolean includeClass, String prefix, Object key)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generatedpublic void traceStackBetweenMatches(String from, String to, boolean includeClass, boolean includePackage)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notpublic void traceStackBetweenMatches(String from, String to, boolean includeClass, boolean includePackage, String prefix)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic void traceStackBetweenMatches(String from, String to, boolean includeClass, boolean includePackage, String prefix, Object key)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedkey
- an object identifying the trace stream to which
output should be generatedpublic void traceStackRange(String from, String to, boolean isRegExp, boolean includeClass, boolean includePackage, String prefix, Object key)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.isRegExp
- true if from and true should be matched as
regular expressions or false if they should be matched using a
String equals comparison.includeClass
- true if the match should be against the
package and class qualified method nameincludePackage
- true if the match should be against the
package and class qualified method name. ignored if
includeClass is not also true.prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace (restricted) for " + Thread.currentThread().getName() +
"\n" is usedkey
- an object identifying the trace stream to which
output should be generatedpublic String formatStack()
public String formatStack(String prefix)
prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic String formatStack(int maxFrames)
maxFrames
- the maximum number of frames to print or 0 if
no limit should applypublic String formatStack(String prefix, int maxFrames)
prefix
- a String to be printed once before printing each line of stack trace. if supplied as null
then the prefix "Stack trace for thread " + Thread.currentThread().getName() + "\n" is usedmaxFrames
- the maximum number of frames to print or 0 if no limit should applypublic String formatAllStacks()
public String formatAllStacks(String prefix)
prefix
- a String to be printed once before printing each line of stack trace. if supplied as null
then the prefix "Stack trace for thread " + Thread.currentThread().getName() + "\n" is usedpublic String formatAllStacks(int maxFrames)
maxFrames
- the maximum number of frames to print or 0 if
no limit should applypublic String formatAllStacks(String prefix, int maxFrames)
prefix
- a String to be printed once before printing each line of stack trace. if supplied as null
then the prefix "Stack trace for thread " + Thread.currentThread().getName() + "\n" is usedmaxFrames
- the maximum number of frames to print or 0 if no limit should applypublic String formatThreadStack(String threadName)
threadName
- a string identifying the threadpublic String formatThreadStack(String threadName, String prefix)
threadName
- a string identifying the threadprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + threadName + "\n" is usedpublic String formatThreadStack(String threadName, int maxFrames)
threadName
- a string identifying the threadmaxFrames
- the maximum number of frames to print or 0 if no limit should applypublic String formatThreadStack(String threadName, String prefix, int maxFrames)
threadName
- a string identifying the threadprefix
- a String to be printed once before printing each line of stack trace. if supplied as null
then the prefix "Stack trace for thread " + threadName + "\n" is usedmaxFrames
- the maximum number of frames to print or 0 if no limit should applypublic String formatStackMatching(String regExp)
regExp
- the pattern to matchpublic String formatStackMatching(String regExp, String prefix)
regExp
- the pattern to matchprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic String formatStackMatching(String regExp, boolean includeClass)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notpublic String formatStackMatching(String regExp, boolean includeClass, String prefix)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic String formatStackMatching(String regExp, boolean includeClass, boolean includePackage)
regExp
- the pattern to matchincludeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notpublic String formatStackMatching(String regExp, boolean includeClass, boolean includePackage, String prefix)
regExp
- a pattern which will be matched against the method name of the stack frame as a
regular expression by calling String.matches()includeClass
- true if the match should be against the package and class qualified method nameincludePackage
- true if the match should be against the package and class qualified method name.
ignored if includeClass is not also true.prefix
- a String to be printed once before printing each line of stack trace. if supplied as null
then the prefix "Stack trace for thread " + Thread.currentThread().getName() + " matching " + pattern + "\n" is usedpublic String formatStackBetween(String from, String to)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.public String formatStackBetween(String from, String to, String prefix)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic String formatStackBetween(String from, String to, boolean includeClass)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notpublic String formatStackBetween(String from, String to, boolean includeClass, String prefix)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic String formatStackBetween(String from, String to, boolean includeClass, boolean includePackage)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notpublic String formatStackBetween(String from, String to, boolean includeClass, boolean includePackage, String prefix)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic String formatStackBetweenMatches(String from, String to)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.public String formatStackBetweenMatches(String from, String to, String prefix)
from
- a string which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a string which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.prefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic String formatStackBetweenMatches(String from, String to, boolean includeClass)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notpublic String formatStackBetweenMatches(String from, String to, boolean includeClass, String prefix)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic String formatStackBetweenMatches(String from, String to, boolean includeClass, boolean includePackage)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notpublic String formatStackBetweenMatches(String from, String to, boolean includeClass, boolean includePackage, String prefix)
from
- a pattern which identifies the first frame which
should be printed. from will be matched against the name of
each successive stack frame from the trigger methdo frame until
a matching frame is found. If null is supplied then the trigger
frame will be used as the first frame to print. If a non-null
value is supplied and no match is found then no frames will be
printed.to
- a pattern which identifies the last frame which
should be printed. to will be matched against the name of each
successive stack frame following the first matched frame until
a matching frame is found. If null is supplied or no match is
found then the bottom frame will be used as the last frame to
print.includeClass
- true if the check should include the
class name false if notincludePackage
- true if the check should include the
package name false if notprefix
- a String to be printed once before printing each
line of stack trace. if supplied as null then the prefix "Stack
trace for thread " + Thread.currentThread().getName() + "\n" is
usedpublic String formatStackRange(String from, String to, boolean isRegExp, boolean includeClass, boolean includePackage, String prefix)
from
- a pattern which identifies the first frame which should be printed. from will be matched against
the name of each successive stack frame from the trigger methdo frame until a matching frame is found. If null
is supplied then the trigger frame will be used as the first frame to print. If a non-null value is supplied
and no match is found then no frames will be printed.to
- a pattern which identifies the last frame which should be printed. to will be matched against
the name of each successive stack frame following the first matched frame until a matching frame is found.
If null is supplied or no match is found then the bottom frame will be used as the last frame to print.isRegExp
- true if from and true should be matched as regular expressions or false if they should be
matched using a String equals comparison.includeClass
- true if the match should be against the package and class qualified method nameincludePackage
- true if the match should be against the package and class qualified method name.
ignored if includeClass is not also true.prefix
- a String to be printed once before printing each line of stack trace. if supplied as null
then the prefix "Stack trace (restricted) for " + Thread.currentThread().getName() + "\n" is usedpublic boolean setTriggering(boolean enabled)
enabled
- true if triggering should be enabled or false if it should be disabledpublic long getObjectSize(Object o)
o
- the object whose size is soughtpublic String toString()
public static void activated()
public static void deactivated()
public static void installed(Rule rule)
public static void uninstalled(Rule rule)
protected StackTraceElement[] getStack()
protected int triggerIndex(StackTraceElement[] stack)
stack
- an array of stack trace elements for the current
stackprotected int matchIndex(StackTraceElement[] stack, String pattern, boolean isRegExp, boolean includeClass, boolean includePackage, int start, int limit)
stack
- array of stack trace elementspattern
- a pattern to be matched against the concatenated
frame method name using String.matches()isRegExp
- true if the pattern should be matched as a
regular expression or false if it should be matched using a
String equals comparisonincludeClass
- true if the method name should be qualified
with the package and class nameincludePackage
- true if the check should include the
package name false if notstart
- the index of the first frame which should be
tested for a match. this must be greater than or equal to the
trigger index.limit
- the index of the first frame which should not be
tested for a match. this must be less than or equal to the
stack lengthprotected void printlnFrame(StringBuffer buffer, StackTraceElement frame)
buffer
- the buffer to write toframe
- the stack frame to printprotected void printFrame(StringBuffer buffer, StackTraceElement frame)
buffer
- the buffer to write toframe
- the stack frame to printCopyright © 2018. All rights reserved.