Generate PlantUML puml file tool for specified java class (v2)

AttributePumlVO.java: import lombok.Getter; import lombok.Setter; import java.io.Serializable; @Getter @Setter public class AttributePumlVO implements Serializable { /** * attribute name */ private String name; /** *Attribute type */ private Class type; @Override public String toString() { return “\ticon_hammer ” + this.name + “: ” + this.type.getSimpleName() + “\\ “; } } ClassPumlGenerate.java: import lombok.Getter; import lombok.Setter; […]

[UML Class Diagram of C++]

UML class diagram UML drawing method of class Relationship between classes inheritance relationship connection relation aggregation relationship Combination relationship Dependencies The difference between association relationships, aggregation relationships, and combination relationships Object-oriented design mainly uses UML class diagrams. Class diagrams are used to describe the classes contained in the system and the relationships between them, helping […]

Use PlantUML to display JSON Data

Display JSON Data JSON format is widely used in software. You can use PlantUML to visualize your data. To activate this feature, the diagram must: begin with @startjson keyword end with @endjson keyword. @startjson { “fruit”:”Apple”, “size”:”Large”, “color”: [“Red”, “Green”] } @endjson Complex example You can use complex JSON structure. @startjson { “firstName”: “John”, “lastName”: […]

java generates PlantUML puml file tool class for the specified Controller

import java.io.FileWriter; import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; public class PlantUMLUtils { public static final Set<String> JDK_CLASS_NAMES = new HashSet<>(); public static final Set<String> JDK_METHOD_NAMES = new HashSet<>(); public static final Set<String> serviceClassNames_alreadyPrint = new HashSet<>(); public static final Set<String> pojoClassNames_alreadyPrint = new HashSet<>(); public […]

Dependency, generalization, implementation, association, aggregation and combination in UML class diagram

Article directory UML diagrams and other diagrams 1 Overview 2. Class diagram 3. Class Diagram – Dependence 4. Class Diagram – Generalization 5. Class Diagram–Implementation 6. Class Diagram – Association 7. Class Diagram – Aggregation 8. Class Diagram – Composition 9. Summary This blog post is compiled based on the course taught by former Shang […]

How to draw UML diagram?

01 What is UML UML (Unified Modeling Language) is a unified modeling language, which is a language for visual modeling of software-intensive systems. There are many kinds of UML diagrams, mainly including the following categories: The most commonly used ones are class diagrams, use case diagrams, and sequence diagrams. 02 Representation method of class diagram […]

Inter-class relationship and UML class diagram representation

Article directory UML diagram of a class relationship between classes connection relation one-way association self-association multiplicity association aggregation relationship Composite (composite) relationship dependencies generalization relationship Interface and Realization (Realization) relationship UML diagram of a class ? Define an Employee class, which contains the attributes name, age and email, and the operation modifyInfo(). The corresponding C […]

Introduction to UML Diagrams

Articledirectory IntroductiontoUMLDiagrams ThefunctionofeachdiagraminUML: UseCaseDiagram ClassDiagram SequenceDiagram ObjectDiagram PackageDiagram ActivityDiagram(ActivityDiagram) StateDiagram(StateMachineDiagram) CollaborationDiagram ComponentDiagram DeploymentDiagram Summarize IntroductiontoUMLDiagram UnifiedModelingLanguage(UML,UnifiedModelingLanguage)isanopenmethodforspecifying,visualizing,constructing,andwritinganopenmethodfortheartifactsofanobject-oriented,software-intensivesystemunderdevelopment.Thereare10diagramsinUML2.0: Staticmodelsrepresentingthestaticstructureofthesystem(includingclassdiagrams,compositestructurediagrams,deploymentdiagrams); Dynamicmodelsrepresentingthedynamicstructureofthesystem(includingusecasediagrams,sequencediagrams,objectdiagrams,collaborationdiagrams,statediagrams,activitydiagrams,componentdiagrams) ThefunctionofeachdiagraminUML: UseCaseDiagram Describerolesandtheconnectionsbetweenrolesandusecases.Describeswhowillusethesystemandwhattheycandowithit.Ausecasediagramcontainsmultiplemodelelements,suchassystem,actor,andusecase,andshowsvariousrelationshipsamongtheseelements,suchasgeneralization,association,anddependency. Theelementscontainedintheusecasediagram: 1.Participant(Actor) Representedbyavillain.Representsauser,organization,orexternalsystemthatinteractswithanapplicationorsystem. 2.UseCase Representedbyanellipse.Referstoasystemfunctionalunitvisiblefromtheoutside,usedtodescribetheservicesprovidedbythesystem. 3.Subsystem Itisusedtoshowsomefunctionsofthesystem. 4.Relationship Relationshiptypesare:association,generalization,containment,andextension. Relationshiptype Meaning Symbolrepresentation Association Communicationbetweenactorandusecase(messagesenderpointstoreceiver) Generalization Inheritancerelationshipbetweenparticipantsorusecases(childpointstoparent) contains Itisusedtodecomposetheusecasefunctionintosmallerfunctions(pointingtothedecomposedusecase) Extended Extensionofusecasefunction(pointingtoextendedusecase) ClassDiagram Aclassdiagramisastaticviewthatdescribestheclassesinthesystemandtherelationshipsbetweenthem.Itallowsustohaveacomprehensiveunderstandingofthesystembeforewritingthecodecorrectly.Aclassdiagramisamodeltype,specifically,astaticmodeltype.Aclassdiagramrepresentsclasses,interfaces,andthecollaborationbetweenthem.Structureofclassdiagram Aclassgenerallyconsistsofthreeparts: Classname:Eachclassmusthaveaname,andtheclassnameisastring. Classattributes:membervariablesoftheclass.Thenumberofattributesofaclassisgreaterthanorequaltozero.Therepresentationmethodis: Visibilityname:type[=default] a.”Visibility”includespublic(public),private(private)andprotected(protected),whicharerespectivelyrepresentedbysymbols+,-and#intheclassdiagram.Indicateswhethertheattributeisvisibletoelementsoutsidetheclass.b.”Name”representstheattributenamewithastring.c.”Type”canbeabasicdatatypeorauser-definedtype,indicatingthedatatypeofanattribute.d.”Defaultvalue”isoptional,thatis,theinitialvalueoftheattribute. Classoperations:membermethodsofaclassthatcanbeusedbyanyinstanceobjectoftheclass.displaymethod: visibilityname(parameterlist)[:returntype] a.Thedefinitionof”visibility”isthesameasthatofattributes.b.”Name”isrepresentedbyacharacterstring.c.”Parameterlist”indicatestheparametersofthemethod,anditssyntaxissimilartothedefinitionoftheproperty.Thenumberofparametersisarbitrary,andmultipleparametersareseparatedbycommas”,”.d.”Returntype”isanoptionalitem,indicatingthereturnvaluetypeofthemethod,dependingonthespecificprogramminglanguage,itcanbeabasicdatatype,auser-definedtype,oranemptytype(void),ifitisConstructorhasnoreturntype. Sixrelationsofclasses1.Dependency Theweakestformofassociationbetweenobjectsisatemporaryassociation.Inthecode,itgenerallyreferstothecallrelationship(useanduserelationship,suchasthedependencyrelationshipbetweenanimalsandoxygen)forotherobjectsestablishedbylocalvariables,functionparameters,andreturnvalues.Intheclassdiagram,itisrepresentedbyadottedlinewithanarrow,andthearrowpointsfromtheusingclasstothedependentclass. 2.Association Themanagementrelationshipisgenerallythataclassknowstheattributesandmethodsofanotherclass,andusuallycontainsthemeaningof”knowing”and”understanding”.Thisrelationshipisstrongerthandependence,andthereisnochanceofdependency,andtherelationshipisnottemporary.Islong-term,andtherelationshipbetweenthetwopartiesisgenerallyequal.Forexample:”Fisherman”needstoknowthe”weather”todecidewhethertogofishing.Areferencerelationshipbetweenobjects,suchastherelationshipbetweenthecustomerclassandtheorderclass(usuallycontainsthemeaningof”know”and”understand”).Intheclassdiagram,itisrepresentedbyasolidlinewithanarrowpointingfromtheusingclasstotheassociatedclass.Canbeunidirectionalandbidirectional. […]

14 UML diagrams (Unified Modeling Language)

Table of Contents 1. Brief description 2. UML composition 3. UML things 4. UML relationship 5. UML diagram 5.1 Classification of UML diagrams 5.2 Structure diagram (static diagram) 1) class diagram 2) Object diagram 3) Component diagram 4) Deployment diagram 5) Product drawing 6) Package diagram 7) Composite structure diagram 5.3 Behavior diagram (dynamic diagram) […]

UML Analysis Modeling — System Analysis Class Diagram

System Analysis Class Diagram 1. What is analytical modeling 1. Analytical Modeling Concepts UML (Unified Modeling Language) is a standard modeling language for software system analysis, design, implementation and maintenance. Analytical modeling of UML refers to the analysis and modeling of software systems using UML language to identify the requirements and functions of the system […]