Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

An annotation-based android injection framework implementation method

An implementation method and annotation technology, which is applied in the field of annotation-based Android injection framework, can solve problems such as redundancy, insufficient coverage of functions, and insufficient framework, so as to reduce the amount of code, elegant code style, and speed up development efficiency. Effect

Active Publication Date: 2021-07-27
SHANDONG CHAOYUE DATA CONTROL ELECTRONICS CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, according to the survey, there is no open source framework for such functions in China, and no detailed documents have been found to introduce this technology; in foreign countries, there are some open source implementation solutions, such as ButterKnife, androidannotations, etc., which are highly complete and can be implemented. Most views are bound to time, but the covered functions are not comprehensive enough. The APP needs to apply for important permissions before it can be used, resulting in redundant codes. It is difficult to add these functions to existing frameworks. These frameworks themselves Not perfect enough, can only rely on other frameworks to accomplish these things

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
  • An annotation-based android injection framework implementation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention will be further described in detail below in conjunction with specific embodiments. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0032] An annotation-based Android injection framework implementation method relies on the APT (Annotation Processing Tool) tool to extract the context of the annotation in the source program, use the context information to realize the semantics in the annotation, add annotations to member variables or methods, and Describe dependencies in annotations and complete the binding of related dependencies;

[0033] When the framework implement...

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 invention discloses an annotation-based implementation method of an Android injection framework, which belongs to the technical field of computer software, relies on an APT tool, extracts the context of annotations in a source program, uses contextual information to realize semantics in annotations, and provides member variables or method to add annotations, and describe the dependencies in the annotations to complete the binding of related dependencies. The invention utilizes the annotation execution view and the binding frame of the listener, which can not only speed up the development efficiency, but also improve the readability of the code, and the code style will appear more elegant, and can be applied in most Android projects.

Description

technical field [0001] The invention relates to the technical field of computer software, in particular to a method for realizing an annotation-based Android injection framework. Background technique [0002] Dependency injection has always been an important concept in software engineering. As mobile development becomes more and more popular, many frameworks have been derived in the Android development process. The purpose of using frameworks is generally to speed up development. For annotation-based dependency injection frameworks , the form of annotation is more concise than the code, so it is often used in the Android development framework. [0003] In the process of Android UI development, it is often necessary to bind views and listeners. Using annotations to execute the framework for binding views and listeners can not only speed up development efficiency, but also improve code readability and code style. It looks more elegant. However, according to the survey, there...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/41
CPCG06F8/436
Inventor 李明远马晓光左英楠李童
Owner SHANDONG CHAOYUE DATA CONTROL ELECTRONICS CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products