User Tools

Site Tools


Can I use DCI in Java?

At runtime (program execution), DCI is about attaching and detaching RoleMethods to objects, while preserving object identity. This makes it tricky to implement DCI in any statically typed language, however many of those languages have features to make it look like a type has other member methods than what's defined in its class or structure:

Unfortunately Java has nothing similar to those features, making a true DCI implementation impossible in the current version of the language. There is simply no clean way to separate what the system is from what it does in Java. All is not lost however; both Scala and Qi4j generate Java object code and have a fully working DCI implementation. Check the Existing DCI Implementations page for links.

can_i_use_dci_in_java.txt · Last modified: 2016/02/24 13:01 by mbrowne