An object automatic conversion method and terminal
An automatic conversion and object technology, applied in the field of data processing, can solve the problems of increasing the amount of code, increasing the workload, and the data structure of the server is not good, so as to simplify the steps and improve the efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0071] Please refer to figure 1 , Embodiment 1 of the present invention is:
[0072] The invention provides a method for automatic object conversion, comprising the following steps:
[0073] S0: After introducing the APT technology into the project corresponding to the DTO, create the first java library, the first java library includes the conversion identifier, field renaming annotation and incremental field annotation;
[0074] Create a second java library, the second java library includes an open source java code generation framework and multiple third-party libraries;
[0075] Wherein, the field renaming annotation includes the first field renaming annotation and the second field renaming annotation; the conversion identifier corresponds to the class, that is, the conversion identifier is located in the class; and the conversion processing identifier is also located in the class, of course not All classes contain the above logos and need to be judged;
[0076] S1: Obtai...
Embodiment 2
[0088] Please refer to figure 2 , the second embodiment of the present invention is:
[0089] The present invention provides an object automatic conversion terminal, comprising a memory 1, a processor 2 and a computer program stored in the memory 1 and operable on the processor 2, and the processor implements the following steps when executing the computer program:
[0090] S0: After introducing the APT technology into the project corresponding to the DTO, create the first java library, the first java library includes the conversion identifier, field renaming annotation and incremental field annotation;
[0091] Create a second java library, the second java library includes an open source java code generation framework and multiple third-party libraries;
[0092] Wherein, the field renaming annotation includes the first field renaming annotation and the second field renaming annotation; the conversion identifier corresponds to the class, that is, the conversion identifier is...
Embodiment 3
[0106] The purpose of the present invention is to solve the problem of a large amount of workload caused by manually implementing the conversion layer, and improve work efficiency. The present invention is based on APT (Annotation Processing Tool annotation processor) technology to dynamically generate code (zero reflection) during compilation, and generate objects and conversion processing classes displayed on the VO interface during Android compilation (judging whether it is empty, and the field name Modify operation), used to convert the data required on the interface, and finally solve the problem of manual conversion.
[0107] In order to solve the problems of the above technologies, the present invention adopts the following solutions:
[0108] 1. Introduce APT technology into the project and create a custom-annotated java library (the first java library), which is used to place the annotation classes needed in the project, that is, custom annotation classes, such as: Co...
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