Development method and device for realizing AOP based on AspectJ, equipment and medium
A face-cutting and custom-defined annotation technology, applied in the computer field, can solve problems such as low code reusability, increased maintenance difficulty, and the inability of the Android system to manage styles uniformly, and achieve the effect of reducing code coupling
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0038] figure 1 The first embodiment of the present invention provides a flowchart of an AOP-based development method. This embodiment is applicable to the situation of implementing aspect-oriented programming in an Android system. The method can be implemented by a development device that implements AOP based on AspectJ. Execution, the development apparatus for implementing AOP based on AspectJ may be implemented in the form of hardware and / or software, and the developing apparatus for implementing AOP based on AspectJ may be configured in an electronic device with data processing capability. like figure 1 As shown, the method includes:
[0039] S110. Determine a custom annotation according to business requirements; use the custom annotation as an entry point.
[0040] The technical solution of this embodiment can be executed by a background server, and is applied to the Android system environment. Among them, AOP is the abbreviation of Aspect Oriented Programming, which i...
Embodiment 2
[0077] figure 2 This is a schematic structural diagram of a development apparatus for implementing AOP based on AspectJ according to Embodiment 2 of the present invention. like figure 2 As shown, the device is applied to the Android system environment; the device includes:
[0078] The custom annotation determination module 210 is configured to determine the custom annotation according to the business requirement; the custom annotation is used as an entry point.
[0079] The aspect program code writing module 220 is used to write the AspectJ aspect program code based on the AspectJ framework.
[0080] The aspect program code injection module 230 is configured to inject the AspectJ aspect program code into the entry point, so as to complete the aspect-oriented programming of business requirements.
[0081] Optionally, the target element types of the custom annotations include constructors and common methods, and the effect period of the annotations is valid at compile time...
Embodiment 3
[0093] image 3 A schematic structural diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (eg, helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are by way of example only, and are not intended to limit implementations of the inventions described and / or claimed herein.
[0094] like image 3 As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a read only memory (ROM) 12, a random access memory (...
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