A word used to describe something

To content | To menu | To search

Wednesday, January 23 2013

Java 8 - Converting method and constructor references

I've done some more work on the Java 8->7 conversion tool (see previous post).

It can now convert method references and constructor references into Java 7.

Thursday, January 17 2013

Converting Java 8 syntax to Java 7

A project I was working on finished up abruptly, and I found myself with some spare time over the last few weeks, so I decided to test out a new idea - a utility to convert Java 8 syntax into Java 7

For the most part, this is simply an experiment - to see how difficult it would be to write such a utility (and the short answer is that it's difficult to do well, but certainly not impossible), but it has the potential to be useful for supporting lambda-based code in environments that do not (yet) have support for Java 8.

I have a working prototype, that supports conversion of a subset of Java 8 features. And by a subset, I mean essentially 1...

It can convert a variable declaration for a functional interface with a lambda initializer into a anonymous inner class. e.g.

Callable<String> callable = () -> "abc" ;

is converted to

Callable<String> callable = new Callable<String>() {
    public String call() throws java.lang.Exception { 
        return "abc"; 

It's a long way from being feature complete, but it's usable (within the scope of what has been implemented). It looks like I'll be starting a new role next week, so that may reduce my time to work on this project for a little while - I wanted to get it published before that happened.

Documentation is available here.

Feedback (and/or patches) highly desired.

Saturday, May 16 2009

Detecting Cycles with Classycle

Oliver's blog entry inspired me to get off my butt and write something.

Since he was writing about checking for cyclic packages with JDepend, I though it would be worth showing how to do the same thing with classycle.

Continue reading...

Thursday, February 21 2008

Announce - Orthodox Type Reflection Library

Prior to the release of Java 5, the Java library had 1 class that provided access to type information at runtime - java.lang.Class. However, with the introduction of generics in Java 5, this has been extended significantly. Dealing with all these classes, and working with them at runtime, is overly complex, and reduces the power of generics.

Orthodox is a library that makes it easier to work with the Java type system at runtime.

Continue reading...

Java Backwards Compatability

Ted blogged about the absence of leadership in the direction of Java (the language).

One of the comments there suggested we forget about backward compatibility.

I'm not necessarily for or against that idea, but I do think it's worth thinking about, so we know what it is we're trying to preserve, and what we're willing to give up.

By necessity then, the first step must be to define what we mean be backwards compatibility...

Continue reading...

- page 1 of 2