Skip to main content

Blog Archive for mister__m during February 2004

As I said, I'm back with more on the new JDK 1.5. There is a new package called java.lang.instrument that allows you to intercept a class before being loaded and modify its bytecode, for example (can I hear standard entry point for AOP support? :-P). Well, let's use it for something different: measuring the size of some objects. Here is the code: import java.lang.instrument.*;import java.util.*;...
Ok, sorry for not blogging for so long, but I have to work, date etc. :-D I hope this is the start of a series of small, but informative blog entries about new features available in Tiger, especially the ones a hundred people haven't mentioned before me :-D To begin with, I'll show you how to use the new nanoTime() method in System. An important thing to notice is that nanoTime()'s return and...