Supercharge Your Innovation With Domain-Expert AI Agents!

Automatic code generation method based on java language

An automatic generation and code generation technology, applied in the creation/generation of source code, instruments, electrical digital data processing, etc., can solve the problems of cumbersome, weak intelligent adaptability, error-prone, etc., to improve the efficiency of code development and improve the quality of the project. , The effect of shortening the project development cycle

Pending Publication Date: 2020-02-21
SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF5 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When there are more and more data tables due to project business needs, there are more and more attribute fields in the tables, and there are more and more query requirements. However, due to the difference in mapping entity class names, etc., it is often necessary to use during the development process. Copying, pasting, and modifying pasted programming methods are not only cumbersome but also error-prone
Although various popular integrated development environments (IDEs) and tools can intelligently and automatically generate some codes, due to different development needs and development frameworks, such intelligent adaptability is still relatively weak.

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
  • Automatic code generation method based on java language
  • Automatic code generation method based on java language

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] Such as figure 1 As shown, a method for automatically generating code based on the java language comprises the following steps:

[0036] Step 1. Build the relevant basic environment for automatic code generation.

[0037] Specifically, in this embodiment, the following steps are included when setting up the relevant basic environment for automatic code generation:

[0038] Step 1.1. Download jdk1.8 version and configure environment variables.

[0039] Step 1.2. Download the dependencies in the maven management project to avoid version incompatibility bugs caused by manually downloading dependent packages.

[0040] Step 1.3. Create a java project, introduce related dependencies, and create a class package.

[0041] By building the basis of the relevant environment for the operation of the java language, including the use of maven tools to complete the required dependency versions in the management project, installing jdk to ensure the basic environment for the operati...

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 automatic generation method based on a java language. The method comprises the following steps: A, building a related basic environment for automatic code generation; B, creating a plurality of configuration classes for project framework building information extraction; C, extracting all business components of each layer in the project to perform code abstraction and construct a code template; and D, generating a to-be-generated business component by utilizing a code generation module according to the code template and the template variables of each layer after template engine replacement. According to the method disclosed by the invention, the problem that the repeatedly used template code is extracted in the process of writing the project code at present can beeffectively solved. A large amount of time can be saved to serve as codes of the service logic. The universal codes are generated, automatic code generation can be achieved only by modifying the corresponding configuration files, the development workload is greatly reduced, efficient collaborative development is conducted between team members, the cost investment of developers is reduced, and thepurpose of reducing development and maintenance cost is achieved.

Description

technical field [0001] The invention relates to the technical field of program automation, in particular to a method for automatically generating codes based on java language. Background technique [0002] In the current software development process, developers often have to write a lot of repetitive code. The reason is that under the currently commonly used layered development model, the general business layer interface calls the persistence layer interface to obtain the data that needs to be operated, and the control layer interface calls the business layer interface to achieve various business processing. When performing operations such as adding, deleting, modifying, and querying data tables that store data, often only the name of the data table is modified, and most of the codes written in this way are the same. When there are more and more data tables due to project business needs, there are more and more attribute fields in the tables, and there are more and more que...

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/36G06F8/30
CPCG06F8/36G06F8/315
Inventor 张浩李成东常清雪
Owner SICHUAN CHANGHONG ELECTRIC CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More