Sealing, Encapsulation, and Mutability

  • Authors:
  • Marina Biberstein;Joseph Gil;Sara Porat

  • Affiliations:
  • -;-;-

  • Venue:
  • ECOOP '01 Proceedings of the 15th European Conference on Object-Oriented Programming
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Both encapsulation and immutability are important mechanisms, that support good software engineering practice. Encapsulation protects a variable against all kinds of access attempts from certain sections of the program. Immutability protects a variable only against write access attempts, irrespective of the program region from which these attempts are made. Taking mostly an empirical approach, we study these concepts and their interaction in JAVA. We propose code analysis techniques, which, using the new sealing information, can help to identify variables as encapsulated, immutable, or both.