Generic traits for the Java platform