Class ExpressionContext
- java.lang.Object
-
- com.nomagic.magicdraw.expressions.evaluation.ExpressionContext
-
@OpenApiAll public class ExpressionContext extends java.lang.ObjectExpression context used to create expressions.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONTEXT_METACLASSstatic java.lang.StringEXPRESSION_SOURCEstatic java.lang.StringPROJECTstatic java.lang.StringTHIS
-
Constructor Summary
Constructors Constructor Description ExpressionContext(Project project)Constructor.ExpressionContext(ExpressionContext parent)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectadd(java.lang.String key, java.lang.Object value)Add value to the current context.ExpressionContextcopy()Create this context copy.java.lang.Objectget(java.lang.String key)Get the value from current context, or parent context if current context has no value.java.util.Set<java.lang.String>getKeys()Context keys.ProjectgetProject()Get project - identical toget(PROJECT).
-
-
-
Field Detail
-
THIS
public static final java.lang.String THIS
- See Also:
- Constant Field Values
-
PROJECT
public static final java.lang.String PROJECT
- See Also:
- Constant Field Values
-
CONTEXT_METACLASS
public static final java.lang.String CONTEXT_METACLASS
- See Also:
- Constant Field Values
-
EXPRESSION_SOURCE
public static final java.lang.String EXPRESSION_SOURCE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExpressionContext
public ExpressionContext(@CheckForNull ExpressionContext parent)Constructor.- Parameters:
parent- parent context.
-
ExpressionContext
public ExpressionContext(Project project)
Constructor.- Parameters:
project- project.
-
-
Method Detail
-
add
@CheckForNull public java.lang.Object add(java.lang.String key, @CheckForNull java.lang.Object value)Add value to the current context.- Parameters:
key- key.value- value.- Returns:
- the previous value associated with key.
-
get
@CheckForNull public java.lang.Object get(java.lang.String key)
Get the value from current context, or parent context if current context has no value.- Parameters:
key- key.- Returns:
- the value associated with key.
-
copy
public ExpressionContext copy()
Create this context copy.- Returns:
- copy.
-
getProject
public Project getProject()
Get project - identical toget(PROJECT).- Returns:
- project.
-
getKeys
public java.util.Set<java.lang.String> getKeys()
Context keys.- Returns:
- keys.
-
-