Skip to main content

Controlling Accessibility in Agile Projects with the Access Modifier Modifier

  • Conference paper
Objects, Components, Models and Patterns (TOOLS EUROPE 2008)

Abstract

Access modifiers like public and private let the programmer control the accessibility of class members. Restricted accessibility supports encapsulation, i.e., the hiding of implementation details behind the interface of a class. However, what is an implementation detail and what makes the interface of a class is often subject to change: especially in an agile setting (with absence of an upfront design dictating accessibility levels), the interface of a class evolves much like its implementation, settling only towards the finalization of a project. However, while insufficient accessibility is reported by the compiler, excessive accessibility is not, the effect being that massively refactored programs usually end up with larger interfaces than necessary. With our Access Modifier Modifier tool, we allow programmers to increase and keep accessibility at higher levels during the development phase, and reduce it only once the required access has stabilized. Fixed design decisions (such as a published API) can be designated by corresponding annotations, making them immune to changes through our tool. Evaluating the Access Modifier Modifier on a number of internal packages taken from the Java open source community, we found that accessibility was excessive in 32% of cases on average.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Ardourel, G., Huchard, M.: Access graphs: Another view on static access control for a better understanding and use. Journal of Object Technology 1(5), 95–116 (2002)

    Google Scholar 

  2. Create Privately Publish Later, http://c2.com/ppr/wiki/JavaIdioms/CreatePrivatelyPublishLater.html

  3. Devanbu, P.T., Balzer, B., Batory, D.S., Kiczales, G., Launchbury, J., Parnas, D.L., Tarr, P.L.: Modularity in the new millenium: A panel summary. In: ICSE, pp. 723–724 (2003)

    Google Scholar 

  4. Eclipse Naming Conventions, http://wiki.eclipse.org/Naming_Conventions#Internal_Implementation_Packages

  5. M Fowler Refactoring: Improving the Design of Existing Code. Addison-Wesley (1999)

    Google Scholar 

  6. Fowler, M.: Public versus published interfaces. IEEE Software 19(2), 18–19 (2002)

    Article  Google Scholar 

  7. Gamma, E., Helm, R., Johnson, R.: J Vlissides Design Patterns – Elements of Reusable Software. Addison-Wesley (1995)

    Google Scholar 

  8. Package Naming Conventions Used in the Apache Harmony Class Library, http://harmony.apache.org/subcomponents/classlibrary/pkgnaming.html

  9. Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Language Specification, http://java.sun.com/docs/books/jls/

  10. Großkinsky, E.: Access Modifier Modifier: Ein Werkzeug zur Einstellung der Sichtbarkeit in Java-Programmen (Master-Arbeit, Lehrgebiet Programmiersysteme, Fernuniversität in Hagen (2007)

    Google Scholar 

  11. Kegel, H.: Constraint-basierte Typinferenz für Java 5 (Diplomarbeit, Fakultät für Mathematik und Informatik, Fernuniversität in Hagen 2007)

    Google Scholar 

  12. Kegel, H., Steimann, F.: Systematically refactoring inheritance to delegation in Java. In: ICSE (2008)

    Google Scholar 

  13. Kiczales, G., Mezini, M.: Aspect-oriented programming and modular reasoning. In: ICSE, pp. 49–58 (2005)

    Google Scholar 

  14. Koved, L., Pistoia, M., Kershenbaum, A.: Access rights analysis for Java. In: OOPSLA, pp. 359–372 (2002)

    Google Scholar 

  15. Leeman, G., Kershenbaum, A., Koved, L., Reimer, D.: Detecting unwanted synchronization in Java programs. In: Conf. on Software Engineering and Applications, pp. 122–132 (2004)

    Google Scholar 

  16. Liskov, B., Wing, J.M.: A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst. 16(6), 1811–1841 (1994)

    Article  Google Scholar 

  17. Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice Hall International (1997)

    Google Scholar 

  18. Palsberg, J., Schwartzbach, M.I.: Object-oriented type inference. In: Proc. of OOPSLA, pp. 146–161 (1991)

    Google Scholar 

  19. Parnas, D.L.: On the criteria to be used in decomposing systems into modules. Commun. ACM 15(12), 1053–1058 (1972)

    Article  Google Scholar 

  20. BC Pierce Types and Programming Languages. MIT Press (2002)

    Google Scholar 

  21. Steimann, F., Mayer, P.: Patterns of interface-based programming. Journal of Object Technology 4(5), 75–94 (2005)

    Google Scholar 

  22. Steimann, F.: The paradoxical success of aspect-oriented programming. In: OOPSLA, pp. 481–497 (2006)

    Google Scholar 

  23. Steimann, F.: The Infer Type refactoring and its use for interface-based programming. Journal of Object Technology 6(2), 67–89 (2007)

    Google Scholar 

  24. Tip, F.: Refactoring using type constraints. In: Riis Nielson, H., Filé, G. (eds.) SAS 2007. LNCS, vol. 4634, pp. 1–17. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Richard F. Paige Bertrand Meyer

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bouillon, P., Großkinsky, E., Steimann, F. (2008). Controlling Accessibility in Agile Projects with the Access Modifier Modifier. In: Paige, R.F., Meyer, B. (eds) Objects, Components, Models and Patterns. TOOLS EUROPE 2008. Lecture Notes in Business Information Processing, vol 11. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69824-1_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-69824-1_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-69823-4

  • Online ISBN: 978-3-540-69824-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics