Class ExpressionContext


  • @OpenApiAll
    public class ExpressionContext
    extends java.lang.Object
    Expression context used to create expressions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object add​(java.lang.String key, java.lang.Object value)
      Add value to the current context.
      ExpressionContext copy()
      Create this context copy.
      java.lang.Object get​(java.lang.String key)
      Get the value from current context, or parent context if current context has no value.
      (package private) java.util.Map<java.lang.String,​java.lang.Object> getContent()
      Gets the content of this context.
      java.util.Set<java.lang.String> getKeys()
      Context keys.
      (package private) ExpressionContext getParent()
      Gets the parent of this context.
      Project getProject()
      Get project - identical to get(PROJECT).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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
      • mContent

        private final java.util.Map<java.lang.String,​java.lang.Object> mContent
    • 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.
      • getProject

        public Project getProject()
        Get project - identical to get(PROJECT).
        Returns:
        project.
      • getKeys

        public java.util.Set<java.lang.String> getKeys()
        Context keys.
        Returns:
        keys.
      • getParent

        @CheckForNull
        ExpressionContext getParent()
        Gets the parent of this context.
        Returns:
        parent context.
      • getContent

        java.util.Map<java.lang.String,​java.lang.Object> getContent()
        Gets the content of this context.
        Returns:
        content.