public interface MDependency
The MDependency services are obviously a subset of those provided by SmDependency. This is because external programmers are not expected to modify the metamodel and therefore only limited 'get-like' accessors are provided.
Modifier and Type | Method and Description |
---|---|
int |
getMaxCardinality()
Get the maximum cardinality of this dependency.
|
int |
getMinCardinality()
Get the minimum cardinality of this dependency
|
java.lang.String |
getName() |
MClass |
getSource()
Get the origin of this dependency.
|
MDependency |
getSymetric()
Get the opposite dependency.
|
MClass |
getTarget()
Get the dependency target (aka its type).
|
boolean |
isComposition()
Tells whether this dependency is a strong composition.
|
boolean |
isSharedComposition()
Tells whether this dependency is a shared composition.
|
java.lang.String getName()
MClass getTarget()
MClass getSource()
boolean isComposition()
true
for a composition dependency.isSharedComposition()
MDependency getSymetric()
int getMinCardinality()
Usually returns 0 or 1.
int getMaxCardinality()
-1 means no limit, usually return 1 or -1.
boolean isSharedComposition()
Target objects of this dependency may be 'owned' by more than one object.
Note: Be warned that a model object composition graph including shared compositions may
contain cycles. Please mind them when navigating it to avoid infinite loops and StackOverflowError
.
true
for a composition dependency.