Bibliographic Information
- Other Title
-
- Reserved Member ホウシキ ニ ヨル メンバ ノ ジッコウジ ツイカ キコウ ノ テイアン
- Reserved Members for Adding a Member to a Class at Runtime
Search this article
Abstract
本論文ではreserved member方式によるJava言語のためのメンバ(メソッド他)の実行時追加機構を提案する.標準のJava仮想機械は実行時のメンバの追加に対応しておらず,HotSwap機能を用いても既存メソッドの本体の書き換えしかできない.メンバの型の変更などはできない.提案手法では,準備として,実行前(たとえばロード時)に予備のメンバをクラスにあらかじめ追加しておく.これをreserved memberと呼ぶ.実行開始後にユーザがメンバの追加操作を行ったときには,その予備のメンバを変更して,追加されたメンバの機能を実装する.追加されたメンバを参照する式は,その予備のメンバを参照するように修正される.また追加されるメンバがメソッドであるときは,その本体が予備のメンバにコピーされる.また型の整合性をとるために,型変換のコードが適宜挿入される.提案手法はメソッドの上書きに対応しており,また少ない数の予備のメンバでも任意個のメンバを追加できる.本論文ではさらに提案方式のオーバヘッドについても述べる.
In this paper, we present a system using a reserved member to add a member such as a method at runtime in Java. The standard Java virtual machine does not allow adding members at runtime. It can only provide HotSwap, which allows only redefining the body of an existing method; it does not allow changing types of members. The proposed system adds a member, called a reserved member, to classes before execution, for example, at load time. When the user changes a program to add a new member to a class, all the expressions referring to the added member are modified to refer that reserved member. Then, if the added member is a method, the body of the added member is copied into the reserved member. For preserving the type consistency, the system also inserts type conversion code at appropriate places. The system supports method overriding and it allows adding any number of members by using a limited number of reserved members. The performance overheads are also presented in the paper.
Journal
-
- 情報処理学会論文誌プログラミング(PRO)
-
情報処理学会論文誌プログラミング(PRO) 5 (3), 40-49, 2012-08-20
東京 : 情報処理学会
- Tweet
Keywords
Details 詳細情報について
-
- CRID
- 1050564287855365760
-
- NII Article ID
- 40019468723
-
- NII Book ID
- AA11464814
-
- ISSN
- 18827802
- 18827772
- 03875806
-
- NDL BIB ID
- 024048636
-
- Text Lang
- ja
-
- Article Type
- article
-
- Data Source
-
- IRDB
- NDL
- CiNii Articles
- KAKEN