Class Expressions

java.lang.Object
com.dassault_systemes.modeler.kerml.model.Expressions

@OpenApiAll public class Expressions extends Object
Utility class to work with Expression
  • Constructor Details

    • Expressions

      public Expressions()
  • Method Details

    • getResultExpressionOf

      @CheckForNull public static Expression getResultExpressionOf(Type type)
      Returns the result expression of the given type, if defined through a ResultExpressionMembership.
      Parameters:
      type - the type
      Returns:
      result expression, or null
    • getOwnedResultExpressionOf

      @CheckForNull public static Expression getOwnedResultExpressionOf(Type type)
      Returns the owned result expression of the given type, if defined directly on the type through a ResultExpressionMembership.
      Parameters:
      type - the type
      Returns:
      owned result expression, or null
    • isPureExpression

      public static boolean isPureExpression(org.eclipse.emf.ecore.EClass eClass)
      Determines whether the given EClass represents a pure expression. A pure expression is an Expression whose purity is confirmed by ExpressionPurityProvider, if available.
      Parameters:
      eClass - the class to check
      Returns:
      true if the class represents a pure expression
    • isExpressionOrFunction

      public static boolean isExpressionOrFunction(@CheckForNull Element element)
      Checks whether the given element is an expression or a function.
      Parameters:
      element - the element to check
      Returns:
      true if the element is an expression or function
    • isExpressionOrFunction

      public static boolean isExpressionOrFunction(org.eclipse.emf.ecore.EClass eClass)
      Checks whether the given EClass represents an expression or a function.
      Parameters:
      eClass - the class to check
      Returns:
      true if the class is an expression or function
    • getResult

      @CheckForNull public static Feature getResult(Type type)
      Returns the result feature of the given type, if it is an expression or a function.
      Parameters:
      type - the type
      Returns:
      result feature, or null
    • getResultExpressionOrResultValueExpressionOf

      @CheckForNull public static Expression getResultExpressionOrResultValueExpressionOf(Type type)
      Returns the result expression of the given type, or if none exists, returns the value expression of the result feature.
      Parameters:
      type - the type
      Returns:
      result expression or result value expression, or null
    • isBooleanFunctionFromDataFunctions

      public static boolean isBooleanFunctionFromDataFunctions(Function function)
      Checks whether the given function is one of the functions defined in the standard DataFunctionsLibrary.
      Parameters:
      function - the function to check
      Returns:
      true if the function is a standard boolean function