Interface ExpressionResolver


  • @ProviderType
    public interface ExpressionResolver
    A service to resolve an expression into an actual object.
    • Method Detail

      • resolve

        @Nonnull
        <T> T resolve​(@Nonnull
                      String expression,
                      @Nonnull
                      Locale locale,
                      @Nonnull
                      Class<T> expectedType,
                      @Nonnull
                      PageContext pageContext)
        Resolves the given expression.
        Type Parameters:
        T - The type of the resolved expression
        Parameters:
        expression - The expression to resolve
        locale - The locale
        expectedType - The type the result of the expression will be coerced to after evaluation
        pageContext - The current page context
        Returns:
        The result of expression
      • resolve

        @Nonnull
        <T> T resolve​(@Nonnull
                      String expression,
                      @Nonnull
                      Locale locale,
                      @Nonnull
                      Class<T> expectedType,
                      @Nonnull
                      SlingHttpServletRequest request)
        Resolves the given expression.
        Type Parameters:
        T - The type of the resolved expression
        Parameters:
        expression - The expression to resolve
        locale - The locale
        expectedType - The type the result of the expression will be coerced to after evaluation
        request - The current request
        Returns:
        The result of expression