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 ;-)
0 writebacks [/src/java] permanent link
Forget Sun and IBM - Apple Should Open Source its JVM
I *really* like my Powerbook, but Java on Apple hurts on days like today. Serious thought -- maybe Apple should open source their JVM. If it lags behind everyone else, and is buggy, and doesn't run on anything but Apple hardware anyway... they have nothing to lose and everything to gain.
Sure, a non-binary release, uncertified build, probably needs to be called Tea instead of Java, but that is okay. Once it passes TCK, then call it Java. I know of a *lot* of good Java hackers who would love to help Apple get their JVM in shape.
*sigh*