spring-framework / org.springframework.expression.spel.support / ReflectiveConstructorResolver

ReflectiveConstructorResolver

open class ReflectiveConstructorResolver : ConstructorResolver

A constructor resolver that uses reflection to locate the constructor that should be invoked.

Author
Andy Clement

Author
Juergen Hoeller

Since
3.0

Constructors

<init>

ReflectiveConstructorResolver()

A constructor resolver that uses reflection to locate the constructor that should be invoked.

Functions

resolve

open fun resolve(context: EvaluationContext, typeName: String, argumentTypes: MutableList<TypeDescriptor>): ConstructorExecutor

Locate a constructor on the type. There are three kinds of match that might occur:

  1. An exact match where the types of the arguments match the types of the constructor
  2. An in-exact match where the types we are looking for are subtypes of those defined on the constructor
  3. A match where we are able to convert the arguments into those expected by the constructor, according to the registered type converter.