com.holonplatform.core

## Interface ExpressionResolver<E extends Expression,R extends Expression>

- Type Parameters:
    `E` - Expression type
    `R` - Resolved expression type
  All Superinterfaces:
    Expression.ExpressionResolverFunction<E,R>, Serializable
  All Known Subinterfaces:
    DataTarget.DataTargetResolver<T>, QueryFilter.QueryFilterResolver<T>, QuerySort.QuerySortResolver<T>

      public interface ExpressionResolver<E extends Expression,R extends Expression>
      extends Expression.ExpressionResolverFunction<E,R>, Serializable

  Resolver to translate an `Expression` into another `Expression` type.

  The `Priority` annotation can be used on a resolver implementation class to control the invokation order within a set of resolvers. The less is the priority value, the more will be the priority level of the resolver.

  Since:
    5.0.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `ExpressionResolver.ExpressionResolverBuilder<C extends ExpressionResolver.ExpressionResolverBuilder<C>>` Builder fragment to support `ExpressionResolver` registration.
    `static interface` | `ExpressionResolver.ExpressionResolverHandler` Handler to perform `Expression` resolution using a set of registered `ExpressionResolver`s.
    `static interface` | `ExpressionResolver.ExpressionResolverProvider` `ExpressionResolver` provider.
    `static interface` | `ExpressionResolver.ExpressionResolverSupport` Interface to declare the support for `ExpressionResolver` by a class.
    `static interface` | `ExpressionResolver.ResolutionContext` `Expression` resolution context.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_PRIORITY` Default `ExpressionResolver` priority if not specified using `Priority` annotation.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <E extends Expression,R extends Expression> ExpressionResolver<E,R>` | `create(Class<? extends E> expressionType, Class<? extends R> resolvedType, Expression.ExpressionResolverFunction<E,R> function)` Create an `ExpressionResolver` providing expression types and resolution function.
    `Class<? extends E>` | `getExpressionType()` Get the expression type which this resolver can handle.
    `Class<? extends R>` | `getResolvedType()` Get the resolved expression type

    - ### Methods inherited from interface com.holonplatform.core.Expression.ExpressionResolverFunction

      `resolve`

- - ### Field Detail

    - #### DEFAULT_PRIORITY

          static final int DEFAULT_PRIORITY

      Default `ExpressionResolver` priority if not specified using `Priority` annotation.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getExpressionType

          Class<? extends E> getExpressionType()

      Get the expression type which this resolver can handle.
      Returns:
        Expression type (not null)

    - #### getResolvedType

          Class<? extends R> getResolvedType()

      Get the resolved expression type
      Returns:
        Resolved expression type (not null)

    - #### create

          static <E extends Expression,R extends Expression> ExpressionResolver<E,R> create(Class<? extends E> expressionType,
                                                                                            Class<? extends R> resolvedType,
                                                                                            Expression.ExpressionResolverFunction<E,R> function)

      Create an `ExpressionResolver` providing expression types and resolution function.
      Type Parameters:
        `E` - Expression type
        `R` - Resolved expression type
      Parameters:
        `expressionType` - The expression type which this resolver can handle (not null)
        `resolvedType` - The resolved expression type (not null)
        `function` - Actual resolver function (not null)
      Returns:
        A new `ExpressionResolver`

Copyright © 2019 The Holon Platform. All rights reserved.