Class Connections
java.lang.Object
com.dassault_systemes.modeler.sysml.model.Connections
Utility methods for identifying connection- and connector-related types and
for determining connector arity semantics.
These helpers centralize common checks involving ConnectionUsage,
ConnectionDefinition, ConnectorAsUsage, and connector
multiplicity semantics such as binary vs. n-ary connectors.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAlwaysBinary(Connector connector) Returns whether the connector is always binary by definition.static booleanisConnectionDefinition(org.eclipse.emf.ecore.EClass eClass) Returns whether the givenEClassrepresents aConnectionDefinition.static booleanisConnectionUsageOrDefinition(Element element) Returns whether the given element is aConnectionUsageorConnectionDefinition.static booleanisConnectorAsUsage(org.eclipse.emf.ecore.EClass eClass) Returns whether the givenEClassrepresents aConnectorAsUsage.static booleanisConnectorAsUsageOrConnectionDefinition(org.eclipse.emf.ecore.EClass eClass) static booleanisSemanticallyNary(Connector connector) Returns whether the given connector is semantically n-ary.
-
Constructor Details
-
Connections
public Connections()
-
-
Method Details
-
isConnectionUsageOrDefinition
Returns whether the given element is aConnectionUsageorConnectionDefinition.- Parameters:
element- the element to test- Returns:
trueif the element is a connection usage or definition
-
isConnectorAsUsageOrConnectionDefinition
public static boolean isConnectorAsUsageOrConnectionDefinition(org.eclipse.emf.ecore.EClass eClass) - Parameters:
eClass- the class to test- Returns:
trueif the class is a connector-as-usage or connection definition
-
isConnectorAsUsage
public static boolean isConnectorAsUsage(org.eclipse.emf.ecore.EClass eClass) Returns whether the givenEClassrepresents aConnectorAsUsage.- Parameters:
eClass- the class to test- Returns:
trueif the class is a connector-as-usage
-
isConnectionDefinition
public static boolean isConnectionDefinition(org.eclipse.emf.ecore.EClass eClass) Returns whether the givenEClassrepresents aConnectionDefinition.- Parameters:
eClass- the class to test- Returns:
trueif the class is a connection definition
-
isSemanticallyNary
Returns whether the given connector is semantically n-ary. A connector is considered n-ary when it is not restricted to always being binary and its end features indicate n-ary structure.- Parameters:
connector- the connector to test- Returns:
trueif the connector is semantically n-ary
-
isAlwaysBinary
Returns whether the connector is always binary by definition.Certain connector types—such as
AllocationUsage,Flow,Succession, andBindingConnector—are inherently binary regardless of their end feature structure.- Parameters:
connector- the connector to test- Returns:
trueif the connector is always binary
-