IP Library Granted Patent US 11,544,090
Granted Patent B2
US 11,544,090 · App. 17/214,098 · Granted Jan 3, 2023

Implementing dependency injection via direct bytecode generation

Inventors: Stuart Douglas (Orange, AU); Martin Kouba (Brno, CZ)
Assignee: Red Hat, Inc.
G06F9/45529G06F8/41
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 11,544,090
App. No.
17/214,098
Granted
Jan 3, 2023
Kind
B2
Abstract

A system includes a memory and a processor in communication with the memory. The processor is configured to process at least one application file and generate bytecode, responsive to processing the at least one application file, from the at least one application file prior to start-up time. The bytecode contains a metamodel and the metamodel controls dependency injection. Additionally, the metamodel is classified as at least one of a first class that is generated at start-up time, a second class that is generated as source files and compiled at compile time, and a third class that is generated directly as bytecode. The processor is also configured to store the bytecode associated with the third class of metamodel.

Claims (37)

1. A system comprising:

a memory; and

a processor, in communication with the memory, configured to:

process at least one application file;

prior to start-up time of the at least one application file, generate bytecode from the at least one application file responsive to processing the at least one application file, wherein:

the bytecode associated with the at least one application file contains a metamodel configured to control dependency injection, and

the metamodel is generated directly as bytecode; and

store the bytecode associated with the metamodel.

2. The system of claim 1 , wherein the processor is further configured to store the bytecode associated with the at least one application file as one of (i) a final application file on disk or (ii) a final application running in the memory.

3. The system of claim 1 , wherein the processor is further configured to load the bytecode associated with the at least one application file directly into a ClassLoader in the memory.

4. The system of claim 1 , wherein processing the at least one application file occurs prior to the start-up time of the at least one application file.

5. The system of claim 1 , wherein controlling dependency injection includes identifying which objects supply dependencies for other objects.

6. The system of claim 1 , wherein the bytecode associated with the at least one application file is Java Virtual Machine bytecode.

7. The system of claim 1 , wherein the processor is a virtual processor, and wherein the virtual processor executes in a virtual machine.

8. The system of claim 1 , wherein the metamodel is adapted to be pre-built and packaged in the at least one application file without being built at the start-up time of the at least one application file.

9. The system of claim 1 , wherein the at least one application file includes a Java Archive (JAR) file.

10. The system of claim 1 , wherein the at least one application file includes a plurality of class files.

11. A method comprising:

process at least one application file;

prior to start-up time of the at least one application file, generate bytecode from the at least one application file responsive to processing the at least one application file, wherein:

the bytecode associated with the at least one application file contains a metamodel configured to control dependency injection, and

the metamodel is generated directly as bytecode; and

store the bytecode associated with the metamodel.

12. The method of claim 11 , further comprising storing the bytecode associated with the at least one application file as one of (i) a final application file on disk or (ii) a final application running in a memory.

13. The method of claim 11 , wherein processing the at least one application file occurs prior to the start-up time of the at least one application file.

14. The method of claim 11 , wherein controlling dependency injection includes identifying which objects supply dependencies for other objects.

15. The method of claim 11 , wherein the bytecode associated with the at least one application file is Java Virtual Machine bytecode.

16. The method of claim 11 , wherein the metamodel is adapted to be pre-built and packaged in the at least one application file without being built at the start-up time of the at least one application file.

17. The method of claim 11 , wherein the at least one application file includes a Java Archive (JAR) file.

18. The method of claim 11 , wherein the at least one application file includes a plurality of class files.

19. The method of claim 11 , further comprising loading the bytecode associated with the at least one application file directly into a ClassLoader in a memory.

20. A non-transitory machine-readable medium storing code, which when executed by a processor, is configured to:

process at least one application file;

prior to start-up time of the at least one application file, generate bytecode from the at least one application file responsive to processing the at least one application file, wherein:

the bytecode associated with the at least one application file contains a metamodel configured to control dependency injection, and

the metamodel is generated directly as bytecode; and

store the bytecode associated with the metamodel.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 26, 2021
From: DOUGLAS, STUART; KOUBA, MARTIN
To: RED HAT, INC.
Reel/Frame 055738/0395 →
Continuity (2)
Continuation 16670401 · Oct 31, 2019
Related Publication 20210216341A1 · Jul 15, 2021