Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

Advertisement

Springer Nature Link
Log in

Using Annotations to Check Structural Properties of Classes

  • Conference paper

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.

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

  1. Team, X.: XDoclet: Attribute-Oriented Programming,http://xdoclet.sourceforge.net/

  2. Foundation, A.S.: Commons attributes. jakarta.apache.org/commons/attributes/ (2004)

    Google Scholar 

  3. Inc., J.: JBoss AOP 1.0 beta3 (2004),http://www.jboss.org

  4. Beust, C.: SGen (2004),http://www.beust.com/sgen/

  5. DeMichiel, L.G.: Enterprise JavaBeans Specification, Version 2.1. SUN Microsystems (2003)

    Google Scholar 

  6. Russell, C.: Java Data Objects, Version 1.0. SUN Microsystems (2002)

    Google Scholar 

  7. Sun Microsystems: Java management extensions. White paper, Palo Alto, California, USA (1999)

    Google Scholar 

  8. Archer, T.: Inside C#. Microsoft Press (2001)

    Google Scholar 

  9. Bloch, J.: A metadata facility for the java programming language. Java Specification Request 175, SUN Microsystems (2002)

    Google Scholar 

  10. DeMichiel, L.G.: Enterprise javabeans specification, version 3.0. Java Specification Request 220 (2003)

    Google Scholar 

  11. Russell, C.: Java data objects 2.0 - an extension to the jdo specification. Java Specification Request 243 (2004)

    Google Scholar 

  12. Zotter, B.: Web services metadata for the java platform. Java Specification Request 181 (2004)

    Google Scholar 

  13. Bruce, J.: Jdbc 4.0 api specification. Java Specification Request 221 (2004)

    Google Scholar 

  14. Mordani, R.: Common annotations for the java platform. Java Specification Request 250 (2004)

    Google Scholar 

  15. 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

    Google Scholar 

  16. Eichberg, M.: Battoxml (2004),http://www.st.informatik.tu-darmstadt.de/BAT

  17. 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)

    Google Scholar 

  18. Clark, J., DeRose, S.: XML Path Language (XPath) Version 1.0 ,http://www.w3.org/TR/1999/REC-xpath-19991116

  19. 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)

    Google Scholar 

  20. Tchepannou, H., McSweeney, B., Cooley, J.: xPetstore (2003),http://xpetstore.sourceforge.net

  21. Hovemeyer, D., Pugh, W.: Finding bugs is easy. SIGPLAN Notices (December 2004)

    Google Scholar 

  22. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns. Professional Computing Series. Addison-Wesley, Reading (1995)

    Google Scholar 

  23. Artho, C.: Finding faults in multi-threaded programs (2001),http://artho.com/jlint/

  24. Sureshot: JiveLint v1.22,http://www.sureshotsoftware.com/javalint/

  25. 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)

    Google Scholar 

  26. 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)

    Chapter  Google Scholar 

  27. 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)

    Chapter  Google Scholar 

  28. PMD.,http://pmd.sourceforge.net

  29. Kühne, L., Studman, M., Burn, O., Sukhodolsky, O., Giles, R.: Checkstyle (2004),http://checkstyle.sourceforge.net/

  30. Evans, D., Larochelle, D.: Improving security using extensible lightweight static analysis. IEEE Software (January/February 2002)

    Google Scholar 

  31. Cok, D., Kiniry, J.: Esc/java2 (2004),http://www.cs.kun.nl/sos/research/escjava/

  32. 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

    Google Scholar 

Download references

Author information

Authors and Affiliations

  1. Software Technology Group, Department of Computer Science, Darmstadt University of Technology, Germany

    Michael Eichberg, Thorsten Schäfer & Mira Mezini

Authors
  1. Michael Eichberg

    You can also search for this author inPubMed Google Scholar

  2. Thorsten Schäfer

    You can also search for this author inPubMed Google Scholar

  3. Mira Mezini

    You can also search for this author inPubMed Google Scholar

Editor information

Editors and Affiliations

  1. 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

Publish with us


[8]ページ先頭

©2009-2025 Movatter.jp