Bytecode transformations using virtual artifacts
AssigneeRed Hat, Inc.
InventorsStuart Wade Douglas, James Roger Perkins
Life of this patent
Estimating the term…
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.
Claims20
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.
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.
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.
Dependencies are inferred from the claim text.