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

Pending Publication Date: 2022-06-03
AGRICULTURAL BANK OF CHINA
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, if you dynamically apply for user privacy permissions in Android 6.0 and above, you need to authorize the user before you can use this type of permission.
However, dynamic applicati...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Development method and device for realizing AOP based on AspectJ, equipment and medium
  • Development method and device for realizing AOP based on AspectJ, equipment and medium
  • Development method and device for realizing AOP based on AspectJ, equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

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 (...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention discloses a development method and device for realizing AOP based on AspectJ, equipment and a medium. The method is applied to an Android system environment. The method comprises the following steps: determining a user-defined annotation according to a service demand; taking the user-defined annotation as an entry point; writing an AspectJ section program code on the basis of an AspectJ framework; and injecting the AspectJ section program code into the entry point so as to complete the section-oriented programming of the business demand. According to the technical scheme, the Android system can achieve the purpose of unified management of styles in a section-oriented programming mode, code coupling in the function module is reduced, and therefore code reusability is improved, and the code maintenance difficulty of the function module is reduced.

Description

technical field [0001] The present invention relates to the field of computer technology, and in particular, to a development method, apparatus, device and medium for realizing AOP based on AspectJ. Background technique [0002] With the continuous development of computer technology, there are more and more interactive services between various application systems. [0003] Aspect-Oriented Programming (AOP) is currently very convenient and powerful in Spring, but it is very limited in Android development. [0004] In the current Android client project development process, it can usually be configured directly in the Manifest.xml file. However, if you dynamically apply for permissions for user privacy permissions in Android 6.0 and above, you need the user's authorization before you can use this type of permission. However, the dynamic application for permissions is used in each business module. At present, this method makes the Android system unable to manage the style unif...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F8/20G06F8/36G06F8/41
CPCG06F8/24G06F8/36G06F8/41
Inventor 蔡马坤
Owner AGRICULTURAL BANK OF CHINA
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products