Class Variants
java.lang.Object
com.dassault_systemes.modeler.sysml.model.Variants
Utility class providing helper methods for working with Variants
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TypegetOwningVariation(OwningMembership membership) Returns the type that owns the given variation membership.static TypegetOwningVariation(Usage usage) Returns the type that owns the variation membership of the given usage, if any.static booleanisVariation(Type type) Checks whether the given type represents a variation.
-
Constructor Details
-
Variants
public Variants()
-
-
Method Details
-
isVariation
Checks whether the given type represents a variation. A type is considered a variation if it is aUsageorDefinitionwhoseisVariationflag is set.- Parameters:
type- the type to check- Returns:
- true if the type is a variation
-
getOwningVariation
Returns the type that owns the variation membership of the given usage, if any.- Parameters:
usage- the usage whose owning variation is requested- Returns:
- owning variation type, or null if none exists
-
getOwningVariation
Returns the type that owns the given variation membership. A variation is owned when the membership is aVariantMembershipwhose owning namespace is aType.- Parameters:
membership- the owning membership- Returns:
- owning variation type, or null if none exists
-