Package com.nomagic.magicdraw.uml
Class Refactoring.RelationReversing
java.lang.Object
com.nomagic.magicdraw.uml.Refactoring.RelationReversing
- Enclosing class:
- Refactoring
Reverses direction of a relationship. Switches relation source with target.
An example how to reverse a relationship:
// We have an arbitrary element which represents a relationship. Element element = ...; // Relationship reversing should be wrapped with session create/close calls. SessionManager sessionManager = SessionManager.getInstance(); sessionManager.createSession("Reverse relation"); // Reverse the relationship. Refactoring.RelationReversing.reverseRelationDirection(element); // Close the session. sessionManager.closeSession();
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
reverseRelationDirection
(Element relation) Reverses direction of a relationship.
-
Constructor Details
-
RelationReversing
public RelationReversing()
-
-
Method Details
-
reverseRelationDirection
Reverses direction of a relationship. Switches relation source with target.- Parameters:
relation
- element which represents a relation element.
-