Interface ExpressionResolver

All Known Implementing Classes:
JexlExpressionResolver

public interface ExpressionResolver
Resolves annotation expressions to their corresponding values.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addContext(String key, Object value)
    Add a context to the expression resolver.
    <S, T> void
    addConverter(Class<S> source, Class<T> target, Converter<S,T> converter)
     
    <T> T
    resolve(String expression, Class<T> expectedReturnType)
    Resolves the given expression for the specified method and return type.
  • Method Details

    • resolve

      @Nullable <T> T resolve(String expression, Class<T> expectedReturnType)
      Resolves the given expression for the specified method and return type.
      Type Parameters:
      T - the type of the resolved value
      Parameters:
      expression - the expression to resolve
      expectedReturnType - the expected return type
      Returns:
      the resolved value, or null if it cannot be resolved
    • addContext

      void addContext(String key, Object value)
      Add a context to the expression resolver.
      Parameters:
      key - The key of the context
      value - The value/provider of the context
    • addConverter

      <S, T> void addConverter(Class<S> source, Class<T> target, Converter<S,T> converter)