Move method to Expression
Add compatibility with Java 1.6