接口 ConstructorResolver
- 所有已知实现类:
ReflectiveConstructorResolver
public interface ConstructorResolver
A constructor resolver attempts locate a constructor and returns a ConstructorExecutor that can be used to invoke that constructor. The ConstructorExecutor will be cached but if it 'goes stale' the resolvers will be called again.- 从以下版本开始:
- 3.0
- 作者:
- Andy Clement
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 ConstructorExecutor
resolve(EvaluationContext context, String typeName, List<TypeDescriptor> argumentTypes)
Within the supplied context determine a suitable constructor on the supplied type that can handle the specified arguments.
方法详细资料
resolve
ConstructorExecutor resolve(EvaluationContext context, String typeName, List<TypeDescriptor> argumentTypes) throws AccessException
Within the supplied context determine a suitable constructor on the supplied type that can handle the specified arguments. Return a ConstructorExecutor that can be used to invoke that constructor (ornull
if no constructor could be found).- 参数:
context
- the current evaluation contexttypeName
- the type upon which to look for the constructorargumentTypes
- the arguments that the constructor must be able to handle- 返回:
- a ConstructorExecutor that can invoke the constructor, or null if non found
- 抛出:
AccessException