Class ExpressionContext

java.lang.Object
com.nomagic.magicdraw.expressions.evaluation.ExpressionContext

@OpenApiAll public class ExpressionContext extends Object
Expression context used to create expressions.
  • Field Details

  • Constructor Details

    • ExpressionContext

      public ExpressionContext(@CheckForNull ExpressionContext parent)
      Constructor.
      Parameters:
      parent - parent context.
    • ExpressionContext

      public ExpressionContext(Project project)
      Constructor.
      Parameters:
      project - project.
  • Method Details

    • add

      @CheckForNull public Object add(String key, @CheckForNull Object value)
      Add value to the current context.
      Parameters:
      key - key.
      value - value.
      Returns:
      the previous value associated with key.
    • get

      @CheckForNull public Object get(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 to get(PROJECT).
      Returns:
      project.
    • getKeys

      public Set<String> getKeys()
      Context keys.
      Returns:
      keys.