Resolving the Java Representation Exposure Problem with an AST-Based Deep Copy and Flexible Alias Ownership System

Yung Yu Zhuang, Wei Kuo, Shang Chun Tseng

研究成果: 雜誌貢獻期刊論文同行評審

摘要

Encapsulation is a critical factor in object-oriented programming languages and design patterns. Nevertheless, programs written in languages like Java may encounter broken encapsulation due to the lack of sufficient supply for ownership and immutability. As a result, this paper introduces SlimeJava, an ownership system extension based on abstract syntax trees and annotation utilization of Java that aims to help programmers prevent representation exposure. We show the features of the proposal with a motivating example using the Memento pattern. We then discuss how the utilization of annotations realizes ownership and why it is effective in avoiding representation exposure issues by comparing it with existing approaches. In the end, a quantitative performance evaluation was conducted to prove that SlimeJava does not cause a substantial overhead in execution time compared to native Java.

原文???core.languages.en_GB???
文章編號350
期刊Electronics (Switzerland)
13
發行號2
DOIs
出版狀態已出版 - 1月 2024

指紋

深入研究「Resolving the Java Representation Exposure Problem with an AST-Based Deep Copy and Flexible Alias Ownership System」主題。共同形成了獨特的指紋。

引用此