Runtime generation and injection of java annotations
AssigneeSap SE
InventorSHASHANK MOHAN JAIN
Life of this patent
Estimating the term…
Abstract
An annotation generator utility is implemented. The annotation generator utility reads, from a properties file, configurations of a Java component. The annotation generator utility generates annotations corresponding to the configurations. The annotation generator utility injects the annotations into compiled source code of the Java component. In one aspect, the annotations are injected into compiled source code of the Java component at build time. In another aspect, the annotations are injected into compiled source code of the Java component at runtime.
Claims20
A computer implemented method, the method comprising:
- reading, from a file stored in a memory, configurations of a Java component,
- based on the configurations, generating annotations to be injected into the Java component, and
- a processor injecting the annotations into compiled source code of the Java component.
A computer system, the system comprising:
- a processor, and
- a memory in communication with the processor, the memory comprising:
- a Java component;
- a properties file including configurations of the Java component;
- an annotation generator utility to:
- read, from the properties file the configurations of the Java component,
- upon reading the configurations, generate corresponding annotations to be injected into the Java component, and
- inject the annotations into compiled source code of the Java component.
A non-transitory computer readable medium storing instructions thereon, which when executed by a processor cause a computer system to:
- read, from a file stored in a memory, configurations of a Java component,
- based on the configurations, generate annotations to be injected into the Java component, and
- inject the annotations into compiled source code of the Java component.
The computer readable medium of claim 15, wherein the instructions when executed by the processor cause the computer system to:
- un-packaging a package associated with the Java component;
- parsing byte code of a class file of the Java component, wherein the class file is included in the package;
- injecting the annotations into the byte code of the class file of the Java component;
- and
- repackaging the package by including the class file with the injected annotations.
Dependencies are inferred from the claim text.