A Domain-Oriented, Java Specification Language
In this paper, we propose a domain-oriented, Java specification language that uses executable Java's annotations to specify the state space of each domain class in the model (incl. Class, association, and domain constraint of each attribute.) We argue that, compared to the state-of-the-art, our language provides several benefits for both designer and programmer of Java programs. For designer, the language helps capture the state requirements more completely and more human-friendly using high level constraint functions, and these in turn help provide them with more relevant guidelines for identifying and defining the behavioural specification of class operations. For programmer, the language enables the generic design of two essential programming abstractions that are commonly used for checking the validity of the state space. Further, we will show how the domain class model specified by our language provides precise and executable mappings to a commonly-used logical data model. A prototype of the language has been implemented and is being used in various software projects.