IP Library Granted Patent US 6,925,640
Granted Patent B2
US 6,925,640 · App. 09/977,508 · Granted Aug 2, 2005

Method and apparatus for extending a program element in a dynamically typed programming language

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 6,925,640
App. No.
09/977,508
Granted
Aug 2, 2005
Kind
B2
Abstract

Embodiments of the present invention are directed to a method and apparatus for extending a program element in a dynamically typed programming language. In one embodiment, a program element is extended without altering the source code defining the program element. An extend structure is used to extend a program element in a particular program. In one embodiment, the program element is a function. The function is extended by adding code to be executed by the function. In another embodiment, the program element is an enumeration. The enumeration is extend by adding additional constants to the enumeration. In another embodiment, the program element is a class. In one embodiment, a class is extended by adding code to the constructor of the class. In another embodiment, a class is extended by adding member variables to the class. In yet another embodiment, a class is extended by adding member functions to the class.

Claims (57)

1. A method of extending a program element comprising:

writing source code wherein said source code includes said program element;

determining if said program element is to be extended; and

extending said program element, if so, using an extend structure,

wherein the extend structure is included in the source code.

2. The method of claim 1 wherein said program element is defined in a repository of computer code.

3. The method of claim 1 wherein said program element is a function.

4. The method of claim 3 wherein said extending comprises:

providing a set of program code wherein said program code is executed whenever said function is executed.

5. The method of claim 1 wherein said program element is an enumeration.

6. The method of claim 5 wherein said extending comprises:

providing a set of program code wherein said program code adds one or more elements to said enumeration.

7. The method of claim 1 wherein said program element is a class.

8. The method of claim 7 wherein said extending comprises:

providing a set of program code wherein said program code adds one or more member variables to said class.

9. The method of claim 7 wherein said extending comprises:

providing a set of program code wherein said program code adds one or more member functions to said class.

10. The method of claim 7 wherein said extending comprises:

providing a set of program code wherein said set is executed whenever a constructor for said class is executed.

11. A program element extender comprising:

source code wherein said source code includes a program element; and

a determiner configured to determine if said program element is to be extended; and

an extender configured to extend said program element, if so, using an extend structure,

wherein the extend structure is included in the source code.

12. The program element extender of claim 11 wherein said program element is defined in a repository of computer code.

13. The program element extender of claim 11 wherein said program element is a function.

14. The program element extender of claim 13 wherein said extender comprises:

a program code provider configured to provide a set of program code wherein said program code is executed whenever said function is executed.

15. The program element extender of claim 11 wherein said program element is an enumeration.

16. The program element extender of claim 15 wherein said extender comprises:

a program code provider configured to provide a set of program code wherein said program code adds one or more elements to said enumeration.

17. The program element extender of claim 11 wherein said program element is a class.

18. The program element extender of claim 17 wherein said extender comprises:

a program code provider configured to provide a set of program code wherein said program code adds one or more member variables to said class.

19. The program element extender of claim 17 wherein said extender comprises:

a program code provider configured to provide a set of program code wherein said program code adds one or more member functions to said class.

20. The program element extender of claim 17 wherein said extender comprises:

a program code provider configured to provide a set of program code wherein said set is executed whenever a constructor for said class is executed.

21. A computer program product comprising:

a computer usable medium having computer readable program code embodied therein configured for extending a program element, comprising:

computer readable code configured to cause a computer to provide source code wherein said source code includes a program element;

computer readable code configured to cause a computer to determine if said program element is to be extended; and

computer readable code configured to cause a computer to extend said program element, if so, using an extend structure, wherein the extend structure is included in the source code.

22. The computer program product of claim 21 wherein said program element is defined in a repository of computer code.

23. The computer program product of claim 21 wherein said program element is a function.

24. The computer program product of claim 23 wherein said computer readable code configured to cause a computer to extend comprises:

computer readable cede configured to cause a computer to provide a set of program code wherein said program code is executed whenever said function is executed.

25. The computer program product of claim 21 wherein said program element is an enumeration.

26. The computer program product of claim 25 wherein said computer readable code configured to cause a computer to extend comprises:

computer readable code configured to cause a computer to provide a set of program code wherein said program code adds one or more elements to said enumeration.

27. The computer program product of claim 21 wherein said program element is a class.

28. The computer program product of claim 27 wherein said computer readable code configured to cause a computer to extend comprises:

computer readable code configured to cause a computer to provide a set of program code wherein said program code adds one or more member variables to said class.

29. The computer program product of claim 27 wherein said computer readable code configured to cause a computer to extend comprises:

computer readable code configured to cause a computer to provide a set of program code wherein said program adds one or more member functions to said class.

30. The computer program product of claim 27 wherein said computer readable code configured to cause a computer to extend comprises:

computer readable code configured to cause a computer to provide a set of program code wherein said set is executed whenever a constructor for said class is executed.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 12, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037278/0853 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 12, 2001
From: ALLISON, DAVID S.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 012268/0260 →