2007 | OriginalPaper | Buchkapitel
Immutable Objects for a Java-Like Language
verfasst von : C. Haack, E. Poll, J. Schäfer, A. Schubert
Erschienen in: Programming Languages and Systems
Verlag: Springer Berlin Heidelberg
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by
We extend a Java-like language with immutability specifications and a static type system for verifying immutability. A class modifier
immutable
specifies that all class instances are immutable objects. Ownership types specify the depth of object states and enforce encapsulation of representation objects. The type system guarantees that the state of immutable objects does not visibly mutate during a program run. Provided immutability-annotated classes and methods are
final
, this is true even if immutable classes are composed with untrusted classes that follow Java’s type system, but not our immutability type system.