Dependency injection method, apparatus, device, and storage medium
A dependency injection and dependency relationship technology, applied in the field of program development, can solve the problems of slow response, time-consuming, resource-consuming, etc., and achieve the effect of avoiding junk cards
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0061] figure 1 It is a flowchart of a dependency injection method provided in Embodiment 1 of this application.
[0062] The dependency injection method provided by this embodiment can be executed by a program development end, which can be realized by software and / or hardware. The program development end can be composed of two or more physical entities, or can be a physical entity Entity composition.
[0063] First of all, it needs to be explained that an application program can contain multiple modules, and there are dependencies between modules. Such dependencies may cause program instability in large applications. For example, when a certain module A depends on module B, the modification of module B will cause module A to be modified accordingly, or the behavior of module A will also need to be changed accordingly. As the functions of the application program increase, the application program will have more and more modules, and the dependencies between the modules will ...
Embodiment 2
[0086] Figure 4 It is a flow chart of a dependency injection method provided in Embodiment 2 of this application. The dependency injection method provided in this embodiment can be executed by the program development end, and specifically includes:
[0087] Step S210, when compiling the program, determine the core compiling task of the compiling task.
[0088] Wherein, the core compiling task may be a compiling task of converting a source code file into an application program or a library.
[0089] In a specific implementation, program compilation is composed of a large number of compilation tasks, including the compilation task of converting source code files into application programs or libraries, which is taken as the core compilation task.
[0090] Step S220, before executing the core compiling task, collecting source code files.
[0091] In the specific implementation, there is an execution order between different compilation tasks, and the core compilation task is to ...
Embodiment 3
[0117] Figure 7 It is a schematic structural diagram of a dependency injection device provided in Embodiment 3 of the present application. refer to Figure 7 , the dependency injection device provided in this embodiment specifically includes: a file collection module 310, a file parsing module 320, a code generation module 330, and a program generation module 340; wherein:
[0118] A file collection module 310, configured to collect source code files when compiling the program;
[0119] A file parsing module 320, configured to parse the source code file to obtain dependency features;
[0120] A code generation module 330, configured to generate the dependency code of the dependency feature;
[0121] The program generation module 340 is configured to generate an application program according to the source code file and the dependency code, so that when the user terminal runs the application program, it executes the dependency code to obtain the dependency relationship of th...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com