发明名称 Runtime generation and injection of java annotations
摘要 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.
申请公布号 US9471345(B2) 申请公布日期 2016.10.18
申请号 US201314036041 申请日期 2013.09.25
申请人 SAP SE 发明人 Jain Shashank Mohan
分类号 G06F9/44;G06F9/455 主分类号 G06F9/44
代理机构 代理人
主权项 1. 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 at runtime: a processor injecting the annotations into a compiled source code of the Java component, while original source code of the Java component remains unchanged by the injected annotations, wherein injecting the annotations into the compiled source code of the Java component comprises: intercepting a class loading process in a container;detecting class loading of a class file of the java component;injecting the annotations into the class file of the Java component;dynamically updating the configurations corresponding to the compiled source code of the Java component while the original source code of the Java component remains unchanged; andbased on the updated configurations, dynamically modifying the annotations to be injected into the compiled source code of the Java component without recompiling the Java component.
地址 Walldorf DE