透過您的圖書館登入
IP:216.73.216.100
  • 學位論文

可繼承的JAVA列舉

Inheritable Java Enumeration

指導教授 : 陳俊良

摘要


Java 1.5加入許多新功能,包含enumeration。Java內部將enumeration做成class的形式,使得其constants就為instances,有著更強大的支援,附帶有variable、method等功能,不再只是單純的數字。但在class的條件之下,enumeration卻不行使用繼承的用法,以致與Java的核心概念有所衝突。因此本論文試著提出可繼承的Java enumeration,讓enumeration更為彈性,並且可在不更動Virtual Machine的前提之下能夠執行。

關鍵字

列舉 JAVA 繼承 編譯器 class Enum 物件

並列摘要


Java 1.5 adds many new features, including enumeration. It implements enumeration as class. It translates enumeration constants into class instances, so that an enumeration constant is not a pure number. Now, enumeration constant has variables and methods, and it is more powerful. However, inheritance between enumeration is not allowed in Java 1.5.This violates the kernel principle of object-oriented concept. In this thesis, we try to resolve this problem. Under the condition of not changing Java virtual machine, we try to make Java enumeration be inheritable.

並列關鍵字

enumeration JAVA inheritance compiler class Enum instance

參考文獻


[2] Ken Arnold, James Gosling, David Holmes, JavaTM Programming Language, Third Edition, Addison-Wesley, 2000.
[6] Sun Microsysyems, Java Programming Language Enumeration, 2004.
[9] Sun Microsystems, The JavaTM Programming Language Compiler, Javac.
[11] Microsoft, Visual C# developer center, MSDN.
[1] James Gosling, Bill Joy and Guy Steele, The Java Language Specification, Second Edition, Addison-Wesley, 2000.

延伸閱讀


國際替代計量