First, the architecture design work
Two operations have adopted a similar architecture, thus putting together instructions.
- The UmlClass, UmlInterface, UmlState MyUmlxxx other packages to the corresponding class, in addition to storing the corresponding class Id, name, parentId information, the query will use to store all information
- MyUmlxxx all classes establish a corresponding class Container, Container MyUmlxxx all objects stored in the operation to establish the relationship between the Container through each object to be achieved, which can easily manage
- For different Uml FIG establish the corresponding class, a respective class placed Container
The second operation checks the validity of implementation:
UML002: Direct all UmlAttribute and there is UmlAssociationEnd MyUmlClass name in the class, and therefore can be used directly for comparison.
UML008: For UmlClass, the upward directly to the parent class, all classes if found contained the same id, it is considered such a cycle inheritance. In the case of UmlInterface also similar, but because UmlInterface allows multiple inheritance, so all UmlInterface parent need to check again.
UML009: Find all implement the interface of each class, and then see if there are duplicates.
Class two jobs figure shows: