Brian McCallister
Posts: 1282
Nickname: frums
Registered: Sep, 2003
|
Brian McCallister is JustaProgrammer who thinks too much.
|
|
|
|
Redneck CFlow
|
Posted: Sep 30, 2004 8:44 PM
|
|
|
This post originated from an RSS feed registered with Java Buzz
by Brian McCallister.
|
Original Post: Redneck CFlow
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
|
Latest Java Buzz Posts
Latest Java Buzz Posts by Brian McCallister
Latest Posts From Waste of Time
|
|
You know you have been tempted to do this:
final RuntimeException e = new RuntimeException();
final StackTraceElement[] stack = e.getStackTrace();
for (int i = 0; i < stack.length; i++)
{
final StackTraceElement frame = stack[i];
final String clazz = frame.getClassName();
final String method = frame.getMethodName();
final int line = frame.getLineNumber();
final String file = frame.getFileName();
if (signature.matches(clazz, method, line, file))
{
return advice.apply(this, new Object[]{});
}
}
At least once ;-)
Read: Redneck CFlow
|
|