Skip to Main content Skip to Navigation

Un ensemble d'outils orientés modèle pour développer et valider des cadres logiciels à base d'annotations

Carlos Noguera 1
1 ADAM - Adaptive Distributed Applications and Middleware
LIFL - Laboratoire d'Informatique Fondamentale de Lille, Inria Lille - Nord Europe
Abstract : Annotations, in the Java programming language, are a way to embed meta-data into the source-code of a program. Annotations can be used to extend the Java language with concepts specific to a domain. When used in this manner, annotations serve as means to reduce the semantic gap between concepts in the problem domain and the concepts provided by the programming language. For the annotation framework user (i.e., the application programmer) it is important understand how different annotations relate to each other in order to correctly use them and to get errors as soon as possible when not. Annotation frameworks are already being adopted by industry; however, their development remains complex, and it is done largely in an ad-hoc manner. When developing the annotation framework, the programmer must make sure that the program that uses the annotation complies with the constraints defined for it. Such constraints are often relegated to the documentation of the framework, since current annotation processors do not provide a way to specify and check them. In addition to this, current annotation pro- cessors just offer to the framework programmer the AST of the program as manipulation entity. This forces the programmer to reify the annotations himself if he wants higher abstraction elements. To help the annotation framework developer, we propose two annotation frameworks. The first one, called AVal, provides a number of reusable, declarative and extensible constraints that can be used to specify the annotation framework, and can be interpreted in order to validate an annotated program. The second one, called ModelAn, allows the annotation framework developer to describe a model that corresponds to the annotations in the framework, and to express the constraints in terms of this model. Annotated programs are then represented as instances of the (annotation) model, and the constraints checked on it. From this model, Java classes that reify the annotations are generated. The reified annotations can serve as starting point for the interpretation of the annotated program. To validate the approach, we construct the annotation model, and describe the constraints as AVal and OCL expressions of three industrial annotation frameworks: Fraclet, an annotation framework for the Fractal component model, JWS for the development of web services in Java, and the Java Persistence API, part of the EJB3 specification.
Document type :
Complete list of metadatas

Cited literature [64 references]  Display  Hide  Download
Contributor : Lionel Seinturier <>
Submitted on : Monday, February 13, 2012 - 2:30:36 PM
Last modification on : Thursday, February 21, 2019 - 10:52:48 AM
Long-term archiving on: : Monday, May 14, 2012 - 2:20:32 AM


  • HAL Id : tel-00668953, version 1



Carlos Noguera. Un ensemble d'outils orientés modèle pour développer et valider des cadres logiciels à base d'annotations. Génie logiciel [cs.SE]. Université des Sciences et Technologie de Lille - Lille I, 2008. Français. ⟨tel-00668953⟩



Record views


Files downloads