Source code translator
First Claim
1. Computer-readable media embodying instructions executable by a computer to:
- provide a first class library comprising a first plurality of classes of a first language;
provide a second class library comprising a second plurality of classes of the first language each containing one or more of the first plurality of classes of the first language;
provide a third class library comprising a first plurality of classes of a second language;
provide a fourth class library comprising a second plurality of classes of the second language each containing one or more of the first plurality of classes of the second language;
receive source code of the first language defining a third plurality of classes of the first language, one or more calls to one or more of the first plurality of classes of the first language, and one or more calls to one or more of the second plurality of classes of the first language;
translate the third plurality of classes of the first language into a third plurality of classes of the second language;
translate the calls to the first plurality of classes of the first language into calls to the third class library without modifying the calls to the second plurality of classes of the first language; and
generate intermediate language code based on the second plurality of classes of the second language, the calls to the third class library, the calls to the second plurality of classes of the first language, the fourth class library, and the third class library,wherein the calls to the first plurality of classes of the first language comprise calls to object classes or string classes or both,wherein the source code of the first language relies upon classes of the first class library, wherein the source code of the second language relies upon classes of the third class library, wherein the second plurality of classes of the first language normalize the interfaces of the classes of the first class library, and wherein the second plurality of classes of the second language normalize the interfaces of the classes of the third class library,wherein the fourth class library is such that classes of the fourth class library have the same method signatures as corresponding classes in the second class library, andwherein the translation of source code of the first language into source code of the second language does not require the translation of the second class library, but instead calls to a class of the second class library become calls to a corresponding class in the fourth class library with the same method signature.
3 Assignments
0 Petitions
Accused Products
Abstract
A method, computer program product, and apparatus comprise providing a Java developer kit class library comprising first Java classes; providing a Java Open Foundation class library comprising second Java classes each containing one or more of the first Java classes; providing a .NET SDK class library comprising .NET classes; providing a .NET language Open Foundation class library comprising first .NET language classes each containing one or more of the .NET classes; wherein each of the .NET language classes presents the same method signature as one of the second Java classes; receiving Java source code defining third Java classes, first calls to the first Java classes, and second calls to the second Java classes; translating the third Java classes into second .NET language classes; and translating the first calls to calls into the .NET SDK class library without modifying the second calls.
-
Citations
12 Claims
-
1. Computer-readable media embodying instructions executable by a computer to:
-
provide a first class library comprising a first plurality of classes of a first language; provide a second class library comprising a second plurality of classes of the first language each containing one or more of the first plurality of classes of the first language; provide a third class library comprising a first plurality of classes of a second language; provide a fourth class library comprising a second plurality of classes of the second language each containing one or more of the first plurality of classes of the second language; receive source code of the first language defining a third plurality of classes of the first language, one or more calls to one or more of the first plurality of classes of the first language, and one or more calls to one or more of the second plurality of classes of the first language; translate the third plurality of classes of the first language into a third plurality of classes of the second language; translate the calls to the first plurality of classes of the first language into calls to the third class library without modifying the calls to the second plurality of classes of the first language; and generate intermediate language code based on the second plurality of classes of the second language, the calls to the third class library, the calls to the second plurality of classes of the first language, the fourth class library, and the third class library, wherein the calls to the first plurality of classes of the first language comprise calls to object classes or string classes or both, wherein the source code of the first language relies upon classes of the first class library, wherein the source code of the second language relies upon classes of the third class library, wherein the second plurality of classes of the first language normalize the interfaces of the classes of the first class library, and wherein the second plurality of classes of the second language normalize the interfaces of the classes of the third class library, wherein the fourth class library is such that classes of the fourth class library have the same method signatures as corresponding classes in the second class library, and wherein the translation of source code of the first language into source code of the second language does not require the translation of the second class library, but instead calls to a class of the second class library become calls to a corresponding class in the fourth class library with the same method signature. - View Dependent Claims (2)
-
-
3. Computer-readable media embodying instructions executable by a computer to:
-
provide a first class library comprising a first plurality of classes of a first language; provide a second class library comprising a second plurality of classes of the first language each containing one or more of the first plurality of classes of the first language; provide a third class library comprising a first plurality of classes of a second language; provide a fourth class library comprising a second plurality of classes of the second language each containing one or more of the first plurality of classes of the second language; receive source code of the first language defining a third plurality of classes of the first language, one or more calls to one or more of the first plurality of classes of the first language, and one or more calls to one or more of the second plurality of classes of the first language; translate the third plurality of classes of the first language into a third plurality of classes of the second language; translate the calls to the first plurality of classes of the first language into calls to the third class library without modifying the calls to the second plurality of classes of the first language; and generate bytecode of the first language based on the source code of the first language, the second class library, and the first class library; and
wherein the third plurality of classes of the first language are translated into the third plurality of classes of the second language based on the bytecode of the first language,wherein the calls to the first plurality of classes of the first language comprise calls to object classes or string classes or both, wherein the source code of the first language relies upon classes of the first class library, wherein the source code of the second language relies upon classes of the third class library, wherein the second plurality of classes of the first language normalize the interfaces of the classes of the first class library, and wherein the second plurality of classes of the second language normalize the interfaces of the classes of the third class library, wherein the fourth class library is such that classes of the fourth class library have the same method signatures as corresponding classes in the second class library, and wherein the translation of source code of the second language into source code of the first language does not require the translation of the fourth class library, but instead calls to a class of the fourth class library become calls to a corresponding class in the second class library with the same method signatures. - View Dependent Claims (4)
-
-
5. A method comprising:
-
providing to a processor of a computer system a first class library comprising a first plurality of classes of a first language; providing to the processor of the computer system a second class library comprising a second plurality of classes of the first language each containing one or more of the first plurality of classes of the first language; providing to the processor of the computer system a third class library comprising a first plurality of classes of a second language; providing to the processor of the computer system a fourth class library comprising a second plurality of classes of the second language each containing one or more of the first plurality of classes of the second language; receiving at the processor of the computer system source code of the first language defining a third plurality of classes of the first language, one or more calls to one or more of the first plurality of classes of the first language, and one or more calls to one or more of the second plurality of classes of the first language; translating by the processor of the computer system the third plurality of classes of the first language into a third plurality of classes of the second language; translating by the processor of the computer system the calls to the first plurality of classes of the first language into calls to the third class library without modifying the calls to the second plurality of classes of the first language; and generating by the processor of the computer system intermediate language code based on the second plurality of classes of the second language, the calls to the third class library, the calls to the second plurality of classes of the first language, the fourth class library, and the third class library, wherein the calls to the first plurality of classes of the first language comprise calls to object classes or string classes or both, wherein the source code of the first language relies upon classes of the first class library, wherein the source code of the second language relies upon classes of the third class library, wherein the second plurality of classes of the first language normalize the interfaces of the classes of the first class library, and wherein the second plurality of classes of the second language normalize the interfaces of the classes of the third class library, wherein the fourth class library is such that classes of the fourth class library have the same method signatures as corresponding classes in the second class library, and wherein the translation of source code of the first language into source code of the second language does not require the translation of the second class library, but instead calls to a class of the second class library become calls to a corresponding class in the fourth class library with the same method signature. - View Dependent Claims (6)
-
-
7. A method comprising:
-
providing to a processor of a computer system a first class library comprising a first plurality of classes of a first language; providing to the processor of the computer system a second class library comprising a second plurality of classes of the first language each containing one or more of the first plurality of classes of the first language; providing to the processor of the computer system a third class library comprising a first plurality of classes of a second language; providing to the processor of the computer system a fourth class library comprising a second plurality of classes of the second language each containing one or more of the first plurality of classes of the second language; receiving at the processor of the computer system source code of the first language defining a third plurality of classes of the first language, one or more calls to one or more of the first plurality of classes of the first language, and one or more calls to one or more of the second plurality of classes of the first language; translating by the processor of the computer system the third plurality of classes of the first language into a third plurality of classes of the second language; translating by the processor of the computer system the calls to the first plurality of classes of the first language into calls to the third class library without modifying the calls to the second plurality of classes of the first language; and generating by the processor of the computer system bytecode of the first language based on the source code of the first language, the second class library, and the first class library; and
wherein the third plurality of classes of the first language are translated into the third plurality of classes of the second language based on the bytecode of the first language,wherein the source code of the first language relies upon classes of the first class library, wherein the source code of the second language relies upon classes of the third class library, wherein the second plurality of classes of the first language normalize the interfaces of the classes of the first class library, and wherein the second plurality of classes of the second language normalize the interfaces of the classes of the third class library, wherein the fourth class library is such that classes of the fourth class library have the same method signatures as corresponding classes in the second class library, and wherein the translation of source code of the second language into source code of the first language does not require the translation of the fourth class library, but instead calls to a class of the fourth class library become calls to a corresponding class in the second class library with the same method signatures. - View Dependent Claims (8)
-
-
9. An apparatus comprising:
-
means for providing a first class library comprising a first plurality of classes of a first language; means for providing a second class library comprising a second plurality of classes of the first language each containing one or more of the first plurality of classes of the first language; means for providing a third class library comprising a first plurality of classes of a second language; means for providing a fourth class library comprising a second plurality of classes of the second language each containing one or more of the first plurality of classes of the second language; means for receiving source code of the first language defining a third plurality of classes of the first language, one or more calls to one or more of the first plurality of classes of the first language, and one or more calls to one or more of the second plurality of classes of the first language; means for translating the third plurality of classes of the first language into a third plurality of classes of the second language; means for translating the calls to the first plurality of classes of the first language into calls to the third class library without modifying the calls to the second plurality of classes of the first language; and means for generating intermediate language code based on the second plurality of classes of the second language, the calls to the third class library, the calls to the second plurality of classes of the first language, the fourth class library, and the third class library, wherein the calls to the first plurality of classes of the first language comprise calls to object classes or string classes or both, wherein the source code of the first language relies upon classes of the first class library, wherein the source code of the second language relies upon classes of the third class library, wherein the second plurality of classes of the first language normalize the interfaces of the classes of the first class library, and wherein the second plurality of classes of the second language normalize the interfaces of the classes of the third class library, wherein the fourth class library is such that classes of the fourth class library have the same method signatures as corresponding classes in the second class library, wherein the translation of source code of the first language into source code of the second language does not require the translation of the second class library, but instead calls to a class of the second class library become calls to a corresponding class in the fourth class library with the same method signature, and wherein the means run on at least one processor. - View Dependent Claims (10)
-
-
11. An apparatus comprising:
-
means for providing a first class library comprising a first plurality of classes of a first language; means for providing a second class library comprising a second plurality of classes of the first language each containing one or more of the first plurality of classes of the first language; means for providing a third class library comprising a first plurality of classes of a second language; means for providing a fourth class library comprising a second plurality of classes of the second language each containing one or more of the first plurality of classes of the second language; means for receiving source code of the first language defining a third plurality of classes of the first language, one or more calls to one or more of the first plurality of classes of the first language, and one or more calls to one or more of the second plurality of classes of the first language; means for translating the third plurality of classes of the first language into a third plurality of classes of the second language; means for translating the calls to the first plurality of classes of the first language into calls to the third class library without modifying the calls to the second plurality of classes of the first language; and means for generating bytecode of the first language based on the source code of the first language, the second class library, and the first class library; and
wherein the third plurality of classes of the first language are translated into the third plurality of classes of the second language based on the bytecode of the first language,wherein the source code of the first language relies upon classes of the first class library, wherein the source code of the second language relies upon classes of the third class library, wherein the second plurality of classes of the first language normalize the interfaces of the classes of the first class library, and wherein the second plurality of classes of the second language normalize the interfaces of the classes of the third class library, wherein the fourth class library is such that classes of the fourth class library have the same method signatures as corresponding classes in the second class library, wherein the translation of source code of the second language into source code of the first language does not require the translation of the fourth class library, but instead calls to a class of the fourth class library become calls to a corresponding class in the second class library with the same method signatures, and wherein the means run on at least one processor. - View Dependent Claims (12)
-
Specification