Class ELContextWrapper

java.lang.Object
jakarta.el.ELContext
org.apache.jasper.el.ELContextWrapper

public final class ELContextWrapper extends ELContext
Simple ELContextWrapper for runtime evaluation of EL w/ dynamic FunctionMappers
  • Constructor Details

    • ELContextWrapper

      public ELContextWrapper(ELContext target, FunctionMapper fnMapper)
      Construct a new ELContextWrapper.
      Parameters:
      target - The target ELContext to wrap
      fnMapper - The function mapper to use
  • Method Details

    • getELResolver

      public ELResolver getELResolver()
      Description copied from class: jakarta.el.ELContext
      Returns the ELResolver used to resolve properties and method invocations during expression evaluation.
      Specified by:
      getELResolver in class ELContext
      Returns:
      the ELResolver for this context
    • getFunctionMapper

      public FunctionMapper getFunctionMapper()
      Description copied from class: jakarta.el.ELContext
      Returns the FunctionMapper used to resolve EL function names to Java methods during expression evaluation.
      Specified by:
      getFunctionMapper in class ELContext
      Returns:
      the FunctionMapper for this context
    • getVariableMapper

      public VariableMapper getVariableMapper()
      Description copied from class: jakarta.el.ELContext
      Returns the VariableMapper used to resolve EL variable names to ValueExpression instances during expression evaluation.
      Specified by:
      getVariableMapper in class ELContext
      Returns:
      the VariableMapper for this context
    • getContext

      public Object getContext(Class<?> key)
      Description copied from class: jakarta.el.ELContext
      Obtain the context object for the given key.
      Overrides:
      getContext in class ELContext
      Parameters:
      key - The key of the required context object
      Returns:
      The value of the context object associated with the given key
    • getLocale

      public Locale getLocale()
      Description copied from class: jakarta.el.ELContext
      Returns the locale associated with this EL context. The locale is used for type conversion operations such as parsing numbers and dates during expression evaluation.
      Overrides:
      getLocale in class ELContext
      Returns:
      the locale for this context, or null if not set
    • isPropertyResolved

      public boolean isPropertyResolved()
      Description copied from class: jakarta.el.ELContext
      Returns whether a property has been resolved during the current evaluation step. ELResolver implementations call ELContext.setPropertyResolved(boolean) to indicate resolution, and the expression evaluator checks this flag to determine if resolution was successful.
      Overrides:
      isPropertyResolved in class ELContext
      Returns:
      true if a property has been resolved, false otherwise
    • putContext

      public void putContext(Class<?> key, Object contextObject) throws NullPointerException
      Description copied from class: jakarta.el.ELContext
      Add an object to this EL context under the given key.
      Overrides:
      putContext in class ELContext
      Parameters:
      key - The key under which to store the object
      contextObject - The object to add
      Throws:
      NullPointerException - If the supplied key or context is null
    • setLocale

      public void setLocale(Locale locale)
      Description copied from class: jakarta.el.ELContext
      Sets the locale for this EL context. The locale is used for type conversion operations such as parsing numbers and dates during expression evaluation.
      Overrides:
      setLocale in class ELContext
      Parameters:
      locale - the locale to use for this context
    • setPropertyResolved

      public void setPropertyResolved(boolean resolved)
      Description copied from class: jakarta.el.ELContext
      Sets the internal flag indicating whether a property has been resolved during the current evaluation step. This method is used by ELResolver implementations to signal that they have handled the current base/property combination.
      Overrides:
      setPropertyResolved in class ELContext
      Parameters:
      resolved - true if a property has been resolved, false otherwise