Abstract
The use of metadata in software development, specially by code annotations, has emerged to complement some limitations of object-oriented programming. A recent study revealed that a lack of validation on the configured metadata can lead to bugs hard to identify and correct. There are approaches to optimize metadata configuration that add the annotation out of the target code element, such as its definition on the enclosing code element or indirectly inside other annotations. Annotation validation rules that rely on the presence of other annotations are specially hard to perform when it is possible to configure it out of the target element. Available approaches for annotation validation in the literature consider their presence only in the target element. This paper presents a validation of code annotations approach in object-oriented software with location transparency, whereas definitions can occur in different parts of source code related to the target element. An evaluation with a meta-framework supports our hypothesis that the approach is capable of decoupling the annotation location from the validation rules.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
Available at: https://github.com/EsfingeFramework/metadata.
References
JSR175, JSR 175: a metadata facility for the java programming language (2003). http://www.jcp.org/en/jsr/detail?id=175
Guerra, E., Souza, J.T., Fernandes, C.: A pattern language for metadata-based frameworks. In: Proceedings of the 16th Conference on Pattern Languages of Programs, pp. 3:1–3:29. ACM (2009)
Guerra, E., Fernandes, C.: A qualitative and quantitative analysis on metadata-based frameworks usage. In: Murgante, B., Misra, S., Carlini, M., Torre, C.M., Nguyen, H.-Q., Taniar, D., Apduhan, B.O., Gervasi, O. (eds.) ICCSA 2013, Part II. LNCS, vol. 7972, pp. 375–390. Springer, Heidelberg (2013)
Noguera, C., Pawlak, R.: AVal: An extensible attribute-oriented programming validator for java: research articles. J. Softw. Maint. Evol. 19(4), 253–275 (2007)
Darwin, I.: Annabot: a static verifier for java annotation usage. Adv. Softw. Eng. 2010(540547), 1–7 (2010)
Cordoba, I., de Lara, J.: A modelling language for the effective design of java annotations. In: Proceedings of the 30th Annual ACM Symposium on Applied Computing, SAC 2015, pp. 2087–2092. ACM, New York (2015)
Guerra, E., Cardoso, M., Silva, J., Fernandes, C.: Idioms for code annotations in the java language. In: Proceedings of the 17th Latin-American Conference on Pattern Languages of Programs, SugarLoafPLoPe, pp. 1–14 (2010)
Fernandes, C., Ribeiro, D., Guerra, E., Nakao, E.: Xml, annotations and database: a comparative study of metadata definition strategies for frameworks. In: XML: Aplicaes e Tecnologias Associadas, pp. 115–126, Vila do Conde, Portugal (2010)
Miller, J.S., Ragsdale, S.: The Common Language Infrastructure Annotated Standard. Addison-Wesley, Boston (2003)
Noguera, C., Duchien, L.: Annotation framework validation using domain models. In: Schieferdecker, I., Hartman, A. (eds.) ECMDA-FA 2008. LNCS, vol. 5095, pp. 48–62. Springer, Heidelberg (2008)
Baldwin, C.Y., Clark, K.B.: The Power of Modularity. The MIT Press, Cambridge (2000)
Neto, A.C., Ribeiro, M.M., Dsea, D., Bonifcio, R., Borba, P., Soares, S.: Semantic dependencies and modularity of aspect-oriented software. In: Proceedings of the First International Workshop on Assessment of Contemporary Modularization Techniques, pp. 11–16. IEEE Computer Society (2007)
Eichberg, M., Schäfer, T., Mezini, M.: Using annotations to check structural properties of classes. In: Cerioli, M. (ed.) FASE 2005. LNCS, vol. 3442, pp. 237–252. Springer, Heidelberg (2005)
Ruska, S.: Defining annotation constraints in attribute oriented programming. Acta Electrotechnica et Informatica 10(4), 89–93 (2010)
Acknowledgments
The authors would like to thank FAPESP (grant 2014/16236-6), CAPES, and CNPq (grants 445562/2014-5 and 455080/2014-3) for financial support.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
de Siqueira, J.L., Silveira, F.F., Guerra, E.M. (2016). An Approach for Code Annotation Validation with Metadata Location Transparency. In: Gervasi, O., et al. Computational Science and Its Applications -- ICCSA 2016. ICCSA 2016. Lecture Notes in Computer Science(), vol 9789. Springer, Cham. https://doi.org/10.1007/978-3-319-42089-9_30
Download citation
DOI: https://doi.org/10.1007/978-3-319-42089-9_30
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-42088-2
Online ISBN: 978-3-319-42089-9
eBook Packages: Computer ScienceComputer Science (R0)