Specialization classes for Java
Specialization classes for Java are a language extension for integrating forms of adaptive behavior in an existing program. An adaptive class is defined by attaching a number of alternative implementations to a regular Java class, that complement the existing, default implementation. Each alternative implementation is defined by a specialization class, and is to be used in some specific situation. These situations are defined in terms of the internal state of the (instances of the) class, via predicates on the instance variables.