Font Size: a A A

Research And Implementation Of Java Code Automatic Generator Based On UML

Posted on:2021-08-29Degree:MasterType:Thesis
Country:ChinaCandidate:J J LiFull Text:PDF
GTID:2518306452464504Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
As a model-based tool,automatic code generation technology has been known and used by more and more developers due to its efficiency and convenience.The Unified Modeling Language(UML)is a visual modeling language with a clear and intuitive meaning.It provides multiple views to describe system characteristics and model relationships from different perspectives and application levels.This article combines UML and automatic code generation technology,proposes the conversion rules between UML model diagrams and Java code,and uses object-oriented and modular design ideas to divide the Java code automatic generator into input layer,data verification layer,and code.Generation layer,each layer uses the form of a unified interface for data exchange.Designed and implemented a Java code automatic generator based on UML model diagram.The main contents of this paper are as follows:1.Study the mapping rules for converting UML class diagrams and sequence diagrams into Java code,extract the elements and relationships of various model diagrams,build a metamodel of UML model diagrams,and study the mapping between metamodels and Java statement-level code Relationship,and put forward sentence-level code conversion rules.2.Researched three methods of transforming UML state diagrams into Java code.Converted to the class corresponding to the state design pattern,to a single class,and to multiple classes.Finally,the Java code conversion rules for converting UML state diagrams to multiple classes are selected and studied.3.Using DOM,Xpath and trufun-plato plugins to parse the metadata in UML model diagrams.Through the previous study of UML class diagrams,sequence diagrams and state diagrams to the mapping rules of Java code,the coding realized automatic generation of Java code based on UML And verified the proposed Java code mapping rules.Through tests and practical use proofs,the UML model-based automatic Java code generator can convert UML model diagrams into parts of Java code,verifying the correctness and feasibility of the rules studied.
Keywords/Search Tags:UML, Code generation, Java, metamodel
PDF Full Text Request
Related items