Bytecode transformations using virtual artifacts
Abstract
Methods and systems for transforming bytecodes using virtual artifacts are disclosed. In one aspect, a method is provided that includes receiving a build request to convert source code into a first bytecode. A first virtual artifact may be identified within the source code and it may be determined that a local repository does not store the first virtual artifact. A real artifact that corresponds to the first virtual artifact may be retrieved from a centralized repository. A bytecode transformation may be applied to the real artifact to generate a second bytecode and the second bytecode may be added to the first bytecode.
Claims
exact text as granted — not AI-modifiedThe invention claimed is:
1 . A method comprising:
executing, by a processor, a build process for converting source code for an application into application bytecode, wherein the application bytecode includes first bytecode, and wherein the build process involves:
requesting, by the processor and from a repository, second bytecode associated with a virtual artifact that is within the source code for the application;
in response to determining that the repository does not store the second bytecode associated with the virtual artifact, retrieving, by the processor, third bytecode associated with a real artifact that corresponds to the virtual artifact, wherein the third bytecode is usable with a first environment;
applying, by the processor, a bytecode transformation to the third bytecode, wherein the bytecode transformation involves replacing at least a portion of the third bytecode to thereby generate fourth bytecode that is usable with a second environment; and
adding, by the processor, the fourth bytecode to the application bytecode.
2 . The method of claim 1 , wherein the third bytecode is retrieved from the repository or another repository.
3 . The method of claim 1 , wherein the first bytecode is generated based at least in part on real artifacts stored in the repository or another repository.
4 . The method of claim 1 , further comprising:
identifying the virtual artifact in the source code by executing a classifier that is configured to analyze the source code and determine whether a line of the source code corresponds to the virtual artifact or the real artifact.
5 . The method of claim 4 , wherein the classifier is further configured to identify the bytecode transformation used to generate the fourth bytecode.
6 . The method of claim 1 , further comprising storing the fourth bytecode in the repository in association with the virtual artifact.
7 . The method of claim 1 , wherein the application bytecode is executable bytecode stored in memory.
8 . A system comprising:
a processor; and a memory storing instructions which, when executed by the processor, cause the processor to:
execute a build process for converting source code for an application into application bytecode, wherein the application bytecode includes first bytecode, and wherein the build process involves:
requesting, from a repository, second bytecode associated with a virtual artifact that is within the source code for the application;
in response to determining that the repository does not store the second bytecode associated with the virtual artifact, retrieving third bytecode associated with a real artifact that corresponds to the virtual artifact, wherein the third bytecode is usable with a first environment;
applying a bytecode transformation to the third bytecode, wherein the bytecode transformation involves replacing at least a portion of the third bytecode to thereby generate a fourth bytecode that is usable with a second environment; and
adding the fourth bytecode to the application bytecode.
9 . The system of claim 8 , wherein the instructions are further executable by the processor for causing the processor to:
determine that the repository stores the second bytecode associated with the virtual artifact; and based on determining that the repository stores the second bytecode, retrieve the second bytecode corresponding to the virtual artifact from the repository.
10 . The system of claim 8 , wherein the third bytecode is retrieved from the repository or another repository.
11 . The system of claim 8 , wherein the first bytecode is generated based at least in part on real artifacts stored in the repository or another repository.
12 . The system of claim 8 , wherein the virtual artifact is identified by a classifier of a build environment that executes the build process.
13 . The system of claim 12 , wherein the build environment is an extension of an integrated development environment.
14 . The system of claim 12 , wherein the build environment includes a network proxy that receives build requests from multiple computing environments.
15 . The system of claim 8 , wherein the instructions are further executable to cause the processor to:
store the fourth bytecode in the repository in association with the virtual artifact.
16 . The system of claim 8 , wherein the application bytecode is executable bytecode stored in the memory.
17 . A non-transitory computer-readable medium storing instructions which, when executed by a processor, cause the processor to perform operations including:
execute a process for converting source code for an application into application bytecode, wherein the application bytecode includes first bytecode, and wherein the process involves:
requesting, from a repository, second bytecode associated with a virtual artifact that is within the source code for the application;
in response to determining that the repository does not store the second bytecode associated with the virtual artifact, retrieving third bytecode associated with a real artifact that corresponds to the virtual artifact, wherein the third bytecode is usable with a first environment;
applying a bytecode transformation to the third bytecode, wherein the bytecode transformation involves replacing at least a portion of the third bytecode to thereby generate fourth bytecode that is usable with a second environment; and
adding the fourth bytecode to the application bytecode.
18 . The non-transitory computer-readable medium of claim 17 , wherein the third bytecode is retrieved from the repository or another repository.
19 . The non-transitory computer-readable medium of claim 17 , wherein the application bytecode is executable bytecode stored in memory.
20 . The non-transitory computer-readable medium of claim 19 , wherein the source code is also stored in the memory.Join the waitlist — get patent alerts
Track US12524216B2 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.