Top Description Methods
org.springframework.expression

public Interface BeanResolver

Annotations
@FunctionalInterface

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.

Author
Andy Clement
Since
3.0.3

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

an object representing the bean
resolve
(EvaluationContext
the current evaluation context
context
,
String
the name of the bean to look up
beanName
)

Look up a bean by the given name and return a corresponding instance for it.

Method Detail

resolveback to summary
public 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:EvaluationContext

the current evaluation context

beanName:String

the name of the bean to look up

Returns:Object

an object representing the bean

Exceptions
AccessException:
if there is an unexpected problem resolving the bean