Spring Framework

org.springframework.expression.spel.support
Class ReflectiveConstructorResolver

java.lang.Object
  extended by org.springframework.expression.spel.support.ReflectiveConstructorResolver
All Implemented Interfaces:
ConstructorResolver

public class ReflectiveConstructorResolver
extends java.lang.Object
implements ConstructorResolver

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

Since:
3.0
Author:
Andy Clement, Juergen Hoeller

Constructor Summary
ReflectiveConstructorResolver()
           
 
Method Summary
 ConstructorExecutor resolve(EvaluationContext context, java.lang.String typename, java.util.List<TypeDescriptor> argumentTypes)
          Locate a constructor on the type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectiveConstructorResolver

public ReflectiveConstructorResolver()
Method Detail

resolve

public ConstructorExecutor resolve(EvaluationContext context,
                                   java.lang.String typename,
                                   java.util.List<TypeDescriptor> argumentTypes)
                            throws AccessException
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.

Specified by:
resolve in interface ConstructorResolver
Parameters:
context - the current evaluation context
typename - the type upon which to look for the constructor
argumentTypes - the arguments that the constructor must be able to handle
Returns:
a ConstructorExecutor that can invoke the constructor, or null if non found
Throws:
AccessException

Spring Framework