Bringing traits to Java using compile-time code generation