Interface ExpressionResolver


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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> T resolve​(java.lang.String expression, java.util.Locale locale, java.lang.Class<T> expectedType, PageContext pageContext)
      Resolves the given expression.
      <T> T resolve​(java.lang.String expression, java.util.Locale locale, java.lang.Class<T> expectedType, SlingHttpServletRequest request)
      Resolves the given expression.
    • Method Detail

      • resolve

        @Nonnull
        <T> T resolve​(@Nonnull
                      java.lang.String expression,
                      @Nonnull
                      java.util.Locale locale,
                      @Nonnull
                      java.lang.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
                      java.lang.String expression,
                      @Nonnull
                      java.util.Locale locale,
                      @Nonnull
                      java.lang.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