Class Connections

java.lang.Object
com.dassault_systemes.modeler.sysml.model.Connections

@OpenApiAll public class Connections extends Object
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 Details

    • Connections

      public Connections()
  • Method Details

    • isConnectionUsageOrDefinition

      public static boolean isConnectionUsageOrDefinition(@CheckForNull Element element)
      Returns whether the given element is a ConnectionUsage or ConnectionDefinition.
      Parameters:
      element - the element to test
      Returns:
      true if the element is a connection usage or definition
    • isConnectorAsUsageOrConnectionDefinition

      public static boolean isConnectorAsUsageOrConnectionDefinition(org.eclipse.emf.ecore.EClass eClass)
      Returns whether the given EClass represents either a ConnectorAsUsage or a ConnectionDefinition.
      Parameters:
      eClass - the class to test
      Returns:
      true if the class is a connector-as-usage or connection definition
    • isConnectorAsUsage

      public static boolean isConnectorAsUsage(org.eclipse.emf.ecore.EClass eClass)
      Returns whether the given EClass represents a ConnectorAsUsage.
      Parameters:
      eClass - the class to test
      Returns:
      true if the class is a connector-as-usage
    • isConnectionDefinition

      public static boolean isConnectionDefinition(org.eclipse.emf.ecore.EClass eClass)
      Returns whether the given EClass represents a ConnectionDefinition.
      Parameters:
      eClass - the class to test
      Returns:
      true if the class is a connection definition
    • isSemanticallyNary

      public static boolean isSemanticallyNary(Connector connector)
      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:
      true if the connector is semantically n-ary
    • isAlwaysBinary

      public static boolean isAlwaysBinary(Connector connector)
      Returns whether the connector is always binary by definition.

      Certain connector types—such as AllocationUsage, Flow, Succession, and BindingConnector—are inherently binary regardless of their end feature structure.

      Parameters:
      connector - the connector to test
      Returns:
      true if the connector is always binary