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.
Claims19
A method comprising:
- receiving a build request to convert source code for an application into application bytecode, wherein the application bytecode includes a first bytecode for the application;
- identifying a virtual artifact within the source code;
- requesting second bytecode associated with the virtual artifact from a local repository;
- in response to determining that the local repository does not store the second bytecode associated with the virtual artifact, retrieving, from a centralized repository, third bytecode associated with a real artifact that corresponds to the virtual artifact;
- applying a bytecode transformation to the third bytecode associated with the real artifact, wherein the bytecode transformation involves replacing at least a portion of the third bytecode to thereby generate a fourth bytecode, wherein the fourth bytecode is configured for use with a different operating system or a different runtime environment than the third bytecode;
- and
- adding 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:
- receive a build request to convert source code for an application into application bytecode, wherein the application bytecode includes a first bytecode for the application;
- identify a virtual artifact within the source code;
- request second bytecode associated with the virtual artifact from a local repository;
- in response to determining that the local repository does not store the second bytecode associated with the virtual artifact, retrieve, from a centralized repository, third bytecode associated with a real artifact that corresponds to the virtual artifact;
- apply a bytecode transformation to the third bytecode associated with the real artifact, wherein the bytecode transformation involves replacing at least a portion of the third bytecode to thereby generate a fourth bytecode, wherein the fourth bytecode is configured for use with a different operating system or a different runtime environment than the third bytecode;
- and
- add 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:
- receiving a build request to convert source code for an application into application bytecode, wherein the application bytecode includes a first bytecode for the application;
- identifying a virtual artifact within the source code;
- requesting second bytecode associated with the virtual artifact from a local repository;
- in response to determining that the local repository does not store the second bytecode associated with the virtual artifact, retrieving, from a centralized repository, third bytecode associated with a real artifact that corresponds to the virtual artifact;
- applying a bytecode transformation to the third bytecode associated with the real artifact, wherein the bytecode transformation involves replacing at least a portion of the third bytecode to thereby generate a fourth bytecode, wherein the fourth bytecode is configured for use with a different operating system or a different runtime environment than the third bytecode;
- and
- adding the fourth bytecode to the application bytecode.
Dependencies are inferred from the claim text.