US6067577AExpiredUtility

Dynamic method resolution for native methods in a dynamic object-oriented programming language

72
Assignee: APPLE COMPUTERPriority: Sep 30, 1996Filed: Sep 30, 1996Granted: May 23, 2000
Est. expirySep 30, 2016(expired)· nominal 20-yr term from priority
G06F 9/44521G06F 9/449
72
PatentIndex Score
68
Cited by
7
References
36
Claims

Abstract

A variety of mechanisms are disclosed for a dynamically binding native methods in an interpreted bytecode program to functions that are contained in compiled code, such as a dynamically linked library. In one implementation, a shared function is specified by means of a naming convention that is appropriate for the bytecode interpreted program, such as a package of classes. When a native method is to be resolved during loading of a class, the name of the package is examined to see if the method resides in a shared library. If so, it is loaded using techniques that are specific to the compiled code in which the library exists. In another embodiment, a designated base class, or interface, is used to identify the method by which the shared library is to be loaded. In a third type of implementation, a given method requests a class to specify which libraries it needs to be linked to, as it is being loaded, after which the libraries are loaded and the class methods are linked to them.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A method for dynamically binding a class of objects for a computer program written in a first interpreted bytecode program language to functions contained in a shared library written in a second program language, during the operation of a computer, comprising the steps of: defining a mechanism in the first program language which associates a reference to a class of objects and the shared library;   loading the class of objects into memory of the computer during the execution of a program:   detecting the association in said mechanism between the shared library and the class of objects during the loading of the class of objects into memory; and   loading an implementation of a method from the shared library into the computer's memory during the loading of the class of objects.   
     
     
       2. The method of claim 1 wherein said mechanism comprises a naming convention for the language which identifies a group of related classes. 
     
     
       3. The method of claim 2 wherein said naming convention includes an identification of the shared library. 
     
     
       4. The method of claim 3 further including the step of automatically loading the identified shared library upon detecting said identification. 
     
     
       5. The method of claim 3 wherein the identification of the shared library is contained within the name of the package for the group of related classes. 
     
     
       6. The method of claim 1 wherein said mechanism comprises a designated class which identifies a procedure for loading a shared library. 
     
     
       7. The method of claim 6 wherein said procedure identification is followed by a data structure which identifies a library to be loaded. 
     
     
       8. The method of claim 7 wherein said data structure identifies plural libraries to be loaded. 
     
     
       9. The method of claim 5 wherein said designated class comprises an abstract class which is not instantiated. 
     
     
       10. The method of claim 1 wherein said mechanism comprise s a method in said first program language which requests a class to specify libraries to be loaded. 
     
     
       11. The method of claim 1 wherein said mechanism is contained within said program itself. 
     
     
       12. The method of claim 1 wherein said second program language comprises a compiled programming language. 
     
     
       13. In a computer which executes a program written in a first, interpreted bytecode program language, and having an operating system written in a second program language, a system for binding functions provided by said operating system to objects in said program, comprising: a mechanism in the first program language which defines an association between a reference to a class of objects and a function provided by said operating system;   means for detecting the association in said mechanism between the function provided by said operating system and the class of objects during the loading of the class of objects; and   means for loading an implementation of said function into the computer's memory during the loading of the class of objects.   
     
     
       14. The system of claim 13 wherein said functions provided by the operating system are contained in a shared library, and wherein said loading means includes means for dynamically linking the class of objects to the shared library. 
     
     
       15. The system of claim 13 wherein said mechanism comprises a naming convention for the first language which identifies a group of related classes. 
     
     
       16. The system of claim 15 wherein said naming convention includes an identification of a shared library which contains said functions provided by the operating system. 
     
     
       17. The system of claim 16 wherein the identification of the shared library is contained within the name of the package for the group of related classes. 
     
     
       18. The system of claim 13 wherein said mechanism comprises a designated class which identifies a procedure for loading said functions. 
     
     
       19. The system of claim 18 wherein said procedure identification is followed by a data structure which identifies a library to be loaded. 
     
     
       20. The system of claim 18 wherein said designated class comprises an abstract class which is not instantiated. 
     
     
       21. The system of claim 19 wherein said data structure identifies plural libraries to be loaded. 
     
     
       22. The system of claim 13 wherein said mechanism comprises a method in said first program language which requests a class to specify functions to be loaded. 
     
     
       23. The system of claim 13 wherein said mechanism is contained within said program itself. 
     
     
       24. The system of claim 13 wherein said second program language comprises a compiled programming language. 
     
     
       25. A computer-readable storage medium containing a program written in a first, interpreted bytecode program language, said program including: a mechanism which defines an association between a reference to a class of objects in said program and a function provided by an other program written in a second, program language;   means for detecting the association in said mechanism between said function and the class of objects during the loading of the class of objects; and   means for directing the other program to load an implementation of said function into a computer's memory during the loading of the class of objects.   
     
     
       26. The computer-readable storage medium of claim 25 wherein said function is contained in a shared library, and wherein said program further includes means for dynamically linking the class of objects to the shared library. 
     
     
       27. The computer-readable storage medium of claim 25 wherein said mechanism comprises a naming convention for the first language which identifies a group of related classes. 
     
     
       28. The computer-readable storage medium of claim 27 wherein said naming convention includes an identification of a shared library which contains said function provided by the other program. 
     
     
       29. The computer-readable storage medium of claim 28 wherein the identification of the shared library is contained within the name of the package for the group of related classes. 
     
     
       30. The computer-readable storage medium of claim 25 wherein said mechanism comprises a designated class which identifies a procedure for loading said function. 
     
     
       31. The computer-readable storage medium of claim 30 wherein said procedure identification is followed by a data structure which identifies a library to be loaded. 
     
     
       32. The computer-readable storage medium of claim 30 wherein said designated class comprises an abstract class which is not instantiated. 
     
     
       33. The computer-readable storage medium of claim 31 wherein said data structure identifies plural libraries to be loaded. 
     
     
       34. The computer-readable storage medium of claim 25 wherein said mechanism comprises a method in said first program language which requests a class to specify functions to be loaded. 
     
     
       35. The computer-readable storage medium system of claim 25 wherein said mechanism is contained within said program itself. 
     
     
       36. The computer-readable storage medium of claim 25 wherein said second program language comprises a compiled programming language.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.