资 源 简 介
Traits - like known from Scala (aka Ruby mix-ins) in Java.
Of course all but as nice and perfect as in the languages above, but this works without bytecode manipulations, is reasonable type-safe and hopefully not too hard to use.
As a bonus the traits here can be dynamically added and removed.
The intended use is compley composition where a central composition point is not practical. It is hard to find a convincing example as the code evolved from a design problem in a quite complex system.