On Traits and Types in a Java-like Setting