Part of the book series:Lecture Notes in Computer Science ((LNTCS,volume 3442))
Included in the following conference series:
1174Accesses
Abstract
The specification of meta-information, by using attributes in .NET or annotations in Java, along with the source code is gaining widespread use. Meta-information is used for different purposes such as code generation or configuration of the environment in which a class is deployed. However, in most cases using an annotation also implies that constraints, beyond those defined by the language’s semantics, have to be followed. E.g., a class must define a no-arguments constructor or the parameters of a method must have specific types. Currently, these constraints are not checked at all or only to a very limited extend. Hence, a violation can remain undetected and result in deployment-time or even subtle run-time errors. In this paper, we present a user-extensible framework that enables the definition of constraints to check the properties of annotated elements. Further, we demonstrate the application of the framework to check the constraints defined in the EJB 3.0 specification, and an evaluation of the approach based on checking the xPetstore-EJB3.0 project from within Eclipse to test the performance.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Team, X.: XDoclet: Attribute-Oriented Programming,http://xdoclet.sourceforge.net/
Foundation, A.S.: Commons attributes. jakarta.apache.org/commons/attributes/ (2004)
Inc., J.: JBoss AOP 1.0 beta3 (2004),http://www.jboss.org
Beust, C.: SGen (2004),http://www.beust.com/sgen/
DeMichiel, L.G.: Enterprise JavaBeans Specification, Version 2.1. SUN Microsystems (2003)
Russell, C.: Java Data Objects, Version 1.0. SUN Microsystems (2002)
Sun Microsystems: Java management extensions. White paper, Palo Alto, California, USA (1999)
Archer, T.: Inside C#. Microsoft Press (2001)
Bloch, J.: A metadata facility for the java programming language. Java Specification Request 175, SUN Microsystems (2002)
DeMichiel, L.G.: Enterprise javabeans specification, version 3.0. Java Specification Request 220 (2003)
Russell, C.: Java data objects 2.0 - an extension to the jdo specification. Java Specification Request 243 (2004)
Zotter, B.: Web services metadata for the java platform. Java Specification Request 181 (2004)
Bruce, J.: Jdbc 4.0 api specification. Java Specification Request 221 (2004)
Mordani, R.: Common annotations for the java platform. Java Specification Request 250 (2004)
Eichberg, M., Mezini, M., Ostermann, K., Schäfer, T.: A kernel for cross-artifact information engineering in software development environments. In: Proceedings of 11th IEEE Working Conference on Reverse Engineering (WCRE). IEEE Computer Society, Los Alamitos (2004) to appear
Eichberg, M.: Battoxml (2004),http://www.st.informatik.tu-darmstadt.de/BAT
Boag, S., Chamberlin, D., Fernández, M.F., Florescu, D., Robie, J., Siméon, J.: Xquery 1.0: an xml query language. Working Draft 23 Juli 2004, (W3C)
Clark, J., DeRose, S.: XML Path Language (XPath) Version 1.0 ,http://www.w3.org/TR/1999/REC-xpath-19991116
Cepa, V., Mezini, M.: Declaring and enforcing dependencies between.net custom attributes. In: Proceedings of the Third International Conference on Generative Programming and Component Engineering (2004)
Tchepannou, H., McSweeney, B., Cooley, J.: xPetstore (2003),http://xpetstore.sourceforge.net
Hovemeyer, D., Pugh, W.: Finding bugs is easy. SIGPLAN Notices (December 2004)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns. Professional Computing Series. Addison-Wesley, Reading (1995)
Artho, C.: Finding faults in multi-threaded programs (2001),http://artho.com/jlint/
Sureshot: JiveLint v1.22,http://www.sureshotsoftware.com/javalint/
Eichberg, M., Mezini, M., Schäfer, T., Beringer, C., Hamel, K.M.: Enforcing system-wide properties. In: Proceedings of the 15th australian software engineering conference (ASWEC). IEEE Computer Society, Los Alamitos (2004)
Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of aspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–355. Springer, Heidelberg (2001)
Shomrat, M., Yehudai, A.: Obvious or not? regulating architectural decisions using aspect-oriented programming. In: Kiczales, G. (ed.) Proceedings of 1st international conference on aspect-oriented software development (AOSD), Enschede, The Netherlands, pp. 3–9. ACM Press, New York (2002)
Kühne, L., Studman, M., Burn, O., Sukhodolsky, O., Giles, R.: Checkstyle (2004),http://checkstyle.sourceforge.net/
Evans, D., Larochelle, D.: Improving security using extensible lightweight static analysis. IEEE Software (January/February 2002)
Cok, D., Kiniry, J.: Esc/java2 (2004),http://www.cs.kun.nl/sos/research/escjava/
Rutar, N., Almazan, C.B., Foster, J.S.: A comparison of bug finding tools for java. In: 15th IEEE International Symposium on Software Reliability Engineering, ISSRE 2004 (2004), to appear
Author information
Authors and Affiliations
Software Technology Group, Department of Computer Science, Darmstadt University of Technology, Germany
Michael Eichberg, Thorsten Schäfer & Mira Mezini
- Michael Eichberg
You can also search for this author inPubMed Google Scholar
- Thorsten Schäfer
You can also search for this author inPubMed Google Scholar
- Mira Mezini
You can also search for this author inPubMed Google Scholar
Editor information
Editors and Affiliations
DISI–Dipartimento di Informatica e Scienze dell’Informazione, Università di Genova, Via Dodecaneso, 35, P.O. Box, 16146, Genova, Italy
Maura Cerioli
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Eichberg, M., Schäfer, T., Mezini, M. (2005). Using Annotations to Check Structural Properties of Classes. In: Cerioli, M. (eds) Fundamental Approaches to Software Engineering. FASE 2005. Lecture Notes in Computer Science, vol 3442. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-31984-9_18
Download citation
Publisher Name:Springer, Berlin, Heidelberg
Print ISBN:978-3-540-25420-1
Online ISBN:978-3-540-31984-9
eBook Packages:Computer ScienceComputer Science (R0)
Share this paper
Anyone you share the following link with will be able to read this content:
Sorry, a shareable link is not currently available for this article.
Provided by the Springer Nature SharedIt content-sharing initiative