Swinburne
Browse

On the Use of Properties in Java Applications

Download (629.04 kB)
conference contribution
posted on 2024-07-09, 14:19 authored by Markus LumpeMarkus Lumpe, Samiran Mahmud, Rajesh Vasa
When building software systems, developers have to weigh the benefits of using one specific solution approach against the risks and costs of using another one. This process is not random. Certain preferences, architectural styles, and solution domain pressures create systematic biases that we can measure in order to assess their impact on the system being built and the underlying development process itself. In this paper we explore, whether the getter and setter methods in Java give rise to a bias also. Getter and setter methods, called 'properties', are perceived commonplace and considered by some as a threat to data encapsulation. However, little empirical evidence exists that can reliably inform us about the real impact of the use of properties in Java. For this reason, we examined 102 open-source Java systems and discovered that properties are employed much more carefully than one might expect. Contrary to some folklore, developers use properties not just to gain access to an object's private state, but in a systematic and responsible manner and, in general, consistent with the domain requirements of the developed software system.

History

Available versions

PDF (Published version)

ISBN

9781424464753

Conference name

2010 21st Australian Software Engineering Conference

Pagination

9 pp

Publisher

IEEE

Copyright statement

Copyright © 2010 IEEE. The published version is reproduced in accordance with the copyright policy of the publisher. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE.

Language

eng

Usage metrics

    Publications

    Categories

    No categories selected

    Keywords

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC