Interface BeanResolver

All Known Implementing Classes:
BeanFactoryResolver
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface BeanResolver
A bean resolver can be registered with the evaluation context and will kick in for bean references: @myBeanName and &myBeanName expressions.

The & variant syntax allows access to the factory bean where relevant.

Since:
3.0.3
Author:
Andy Clement
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(EvaluationContext context, String beanName)
    Look up a bean by the given name and return a corresponding instance for it.
  • Method Details

    • resolve

      Object resolve(EvaluationContext context, String beanName) throws AccessException
      Look up a bean by the given name and return a corresponding instance for it.

      For attempting access to a factory bean, the name needs a & prefix.

      Parameters:
      context - the current evaluation context
      beanName - the name of the bean to look up
      Returns:
      an object representing the bean
      Throws:
      AccessException - if there is an unexpected problem resolving the bean