Package org.springframework.expression

# Interface ConstructorResolver

All Known Implementing Classes:
  `ReflectiveConstructorResolver`

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 ConstructorResolver
A constructor resolver attempts to locate a constructor and returns a `ConstructorExecutor` that can be used to invoke that constructor.

The `ConstructorExecutor` will be cached, but if it becomes stale the resolvers will be called again.

Since:
  3.0
Author:
  Andy Clement, Sam Brannen
See Also:
  - `ConstructorExecutor`
  - `MethodResolver`

## Method Summary

Modifier and Type
Method
Description
`ConstructorExecutor`
`resolve(EvaluationContext context, String typeName, List<org.springframework.core.convert.TypeDescriptor> argumentTypes)`
Within the supplied context, resolve a suitable constructor on the supplied type that can handle the specified arguments.

## Method Details

### resolve

@Nullable ConstructorExecutor resolve(EvaluationContext context, String typeName, List<org.springframework.core.convert.TypeDescriptor> argumentTypes) throws AccessException
Within the supplied context, resolve a suitable constructor on the supplied type that can handle the specified arguments.

Returns a `ConstructorExecutor` that can be used to invoke that constructor (or `null` if no constructor could be found).

Parameters:
  `context` - the current evaluation context
  `typeName` - the fully-qualified name of the type upon which to look for the constructor
  `argumentTypes` - the types of arguments that the constructor must be able to handle
Returns:
  a `ConstructorExecutor` that can invoke the constructor, or `null` if the constructor cannot be found
Throws:
  `AccessException`