Class ExpressionHelper
- java.lang.Object
 - 
- com.nomagic.magicdraw.expressions.ExpressionHelper
 
 
- 
@OpenApiAll public class ExpressionHelper extends java.lang.ObjectVarious utility methods used forParameterizedExpression. 
- 
- 
Constructor Summary
Constructors Constructor Description ExpressionHelper() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Objectcall(ParameterizedExpression expression, java.lang.Object... arguments)SimplifiedParametrizedExpression call.static java.lang.Objectcall(ParameterizedExpression parameterizedExpression, java.util.List<?> arguments, ValueContext valueContext)CallparameterizedExpressionand returns value.static ParameterizedExpressiongetBehaviorExpression(Behavior behavior)Gets expression represented by a given behavior. 
 - 
 
- 
- 
Method Detail
- 
call
@CheckForNull public static java.lang.Object call(ParameterizedExpression expression, java.lang.Object... arguments) throws java.lang.Exception
SimplifiedParametrizedExpression call. Intended for easier usage from scripts.ValueContextisnull.- Parameters:
 expression- expression to call. If not ParametrizedExpression result will be nullarguments- arguments for the expression- Returns:
 - expression result
 - Throws:
 java.lang.Exception- various exceptions, mostly from java.lang.reflect.Method#invoke(java.lang.Object, java.lang.Object...)
 
- 
call
@CheckForNull public static java.lang.Object call(ParameterizedExpression parameterizedExpression, @CheckForNull java.util.List<?> arguments, @CheckForNull ValueContext valueContext) throws java.lang.Exception
CallparameterizedExpressionand returns value.- Parameters:
 parameterizedExpression- expression which should be calledarguments- arguments for the expression. If arguments do ot match, then exception will be thrownvalueContext- value context for the evaluated value. Usuallynull- Returns:
 - value of the expression call
 - Throws:
 java.lang.Exception- various exceptions, mostly from java.lang.reflect.Method#invoke(java.lang.Object, java.lang.Object...)
 
- 
getBehaviorExpression
@CheckForNull public static ParameterizedExpression getBehaviorExpression(Behavior behavior)
Gets expression represented by a given behavior.- Parameters:
 behavior- behavior which represents an expression.- Returns:
 - parameterized expression.
 
 
 - 
 
 -