Annotation-based Android injection framework

An annotation and framework technology, applied in the field of annotation-based Android injection framework, can solve the problems of insufficient framework, insufficient coverage of functions, redundancy, etc., achieve elegant code style, speed up development efficiency, and reduce the amount of code.

Active Publication Date: 2018-08-31
SHANDONG CHAOYUE DATA CONTROL ELECTRONICS CO LTD
View PDF3 Cites 6 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
  • Annotation-based Android injection framework

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 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 The dependencies are described in the annotations, and the binding of related dependencies is completed;

[0033] When the framework implements an...

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 present invention discloses an annotation-based Android injection framework, and belongs to the technical field of computer software. The method comprises: by relying on the APT tool, extracting the annotated context in the source program; using the context information to implement the semantics in the annotation; adding the annotations for the member variables or methods; and describing the dependencies in the annotations to complete the binding of the relevant dependencies. According to the annotation-based Android injection framework disclosed by the present invention, by using the framework bounded with the annotation execution view and the sound monitor, not only development efficiency can be speeded up, but also the readability of the code can be improved, so that the code styleis more elegant, and the framework can be applied to most Android projects.

Description

technical field [0001] The invention relates to the technical field of computer software, in particular to 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 is no open source fram...

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 Applications(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 Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products