Class Expressions
java.lang.Object
com.dassault_systemes.modeler.kerml.model.Expressions
Utility class to work with
Expression-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressionReturns the owned result expression of the given type, if defined directly on the type through aResultExpressionMembership.static FeatureReturns the result feature of the given type, if it is an expression or a function.static ExpressiongetResultExpressionOf(Type type) Returns the result expression of the given type, if defined through aResultExpressionMembership.static ExpressionReturns the result expression of the given type, or if none exists, returns the value expression of the result feature.static booleanisBooleanFunctionFromDataFunctions(Function function) Checks whether the given function is one of the functions defined in the standardDataFunctionsLibrary.static booleanisExpressionOrFunction(Element element) Checks whether the given element is an expression or a function.static booleanisExpressionOrFunction(org.eclipse.emf.ecore.EClass eClass) Checks whether the given EClass represents an expression or a function.static booleanisPureExpression(org.eclipse.emf.ecore.EClass eClass) Determines whether the given EClass represents a pure expression.
-
Constructor Details
-
Expressions
public Expressions()
-
-
Method Details
-
getResultExpressionOf
Returns the result expression of the given type, if defined through aResultExpressionMembership.- Parameters:
type- the type- Returns:
- result expression, or null
-
getOwnedResultExpressionOf
Returns the owned result expression of the given type, if defined directly on the type through aResultExpressionMembership.- 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 anExpressionwhose purity is confirmed byExpressionPurityProvider, if available.- Parameters:
eClass- the class to check- Returns:
- true if the class represents a pure expression
-
isExpressionOrFunction
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
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
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
Checks whether the given function is one of the functions defined in the standardDataFunctionsLibrary.- Parameters:
function- the function to check- Returns:
- true if the function is a standard boolean function
-