Sunday, March 1, 2009

Writing a Java byte code decoder without actually writing it

During my talk about Preon at Devoxx last year, I mentioned that I was working on capturing Java's class file format in Preon. This weekend, I took another shot at it, and it's starting to come together quite well. :-)

The source code itself is too much to publish here (what else would you expect from something capable of reading byte code), but if you're interested, I suggest you check out the latest version here. And as you will see, it does not actual contain any Java code reading byte code; it's all done in the Preon declarative way. 


1 comments:

Taras Tielkes said...

What does this buy me over the (typical) approach of implementing ASM visitors?

Note: haven't looked at the code, being lazy as usual :)